Questions tagged [laravel-6.2]

Laravel 6.2 of the open-source PHP web framework created by Taylor Otwell. It was released in October 2019. Use it in addition to the [laravel-6] tag if your question is specific to Laravel 6.2. Use the [laravel] tag for general Laravel related questions.

What is new in v6.2.0:

  • Added support for callable objects in Container::call()
  • Add multipolygonz type for postgreSQL
  • Add “unauthenticated” method in auth middleware
  • Add partialMock shorthand
  • Allow Storage::put to accept a Psr StreamInterface
  • Implement new password rule and password confirmation
  • Remove unnecessary param passed to updatePackageArray method
  • Add optional connection name to DatabaseUserProvider
  • Remove brackets arround URL php artisan server
  • Apply limit to database rather than collection
  • Allow to use scoped macro in nested queries
  • Added array to json conversion for sqlite
  • Use the policies() method instead of the property policies
  • Split hasValidSignature method
  • Fixed: validateDimensions() handle image/svg MIME

Resources:

226 questions
4
votes
1 answer

1292 Incorrect datetime value for column 'updated_at'

I've created a table in Laravel with standard datetime columns: Schema::create('lists', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('name'); $table->string('ref'); $table->string('provider'); …
eComEvo
  • 9,511
  • 21
  • 69
  • 123
4
votes
1 answer

How to Install Whoops in Laravel 6 and Above Versions

I have been Working on the Laravel Framework Since 5.4 Here is the History of Laravel Versions And Error Handlers 4.0 - 4.2 - filp/whoops 5.0 - 5.4 - symfony/error-handler 5.5 - 5.8 - filp/whoops And By the Relese of Laravel 6.0 they have…
Manojkiran.A
  • 3,562
  • 3
  • 18
  • 33
3
votes
3 answers

How to query- Where In Array Key Value Laravel with Mongodb

This is my database Structure { "_id":"5e4d4d6fc01c0000cc0009bd", "UID":"5e30376327050000b3006cde", "delevery_charge":25, "order_item":[ { "id":"5e2f4a636c630000f20053bc", "Name":"XXXXX", …
Rubel Khan
  • 57
  • 5
3
votes
4 answers

Pass two variable to method in Laravel

i want to find post by slug also in url .. but the comments must be found by post_id Controller public function post($slug,$id) { $post = Post::where('slug',$slug)->first(); $comments = Comment::where('post_id',$id)->get(); return…
Hamad Essa
  • 81
  • 6
2
votes
0 answers

Laravel how to get user id in controller from foreach

I am new to Laravel and I want to get the user's id(in HomeController.php) in the foreach(in home.blade.php). I am using Laravel 6.*. This is the code in home.blade.php @foreach($follow as $user)
2
votes
0 answers

Laravel 6.2: How to change [from address] field in mail of Laravel

I am using Laravel 6.2 now. I am sending the email using below code. Mail::send('emails.sample',[],function($message) use($subject) { $message->subject($subject); $message->from('test@example.com', 'supplier'); …
2
votes
2 answers

Laravel Spatie Permissions - user and role relation get only id and name

I'm using Laravel Spatie Permissions to manage roles and permissions in my app. I'm traing to retrieve only Role id and name in the relation between users and roles. My UserResource looks like this: class UserResource extends JsonResource { /** …
Guido Caffa
  • 901
  • 1
  • 7
  • 17
2
votes
0 answers

generate Uniq Transaction Id only Number in Laravel6+

I am posting this question here because i could't find the right solution: I have to make a uniq transaction id which i am generating with the time() + rand() In this function still collision can happen.. My question is is there any better way to…
Abir Adak
  • 21
  • 3
2
votes
3 answers

Laravel 6 : Cannot send message without a sender address

why am i getting this error when i try to send an email from the contact from to my mailtrap Error message image Here is my web routes…
Jareer
  • 203
  • 1
  • 10
2
votes
1 answer

Laravel seed create wrong number of rows in DB

I'm trying to create a seeder with relationships public function run() { factory(Company::class, 10)->create()->each(function ($company){ $company->buildings()->saveMany(factory(Building::class, 5)->create()->each(function ($building){ …
Miquel Àngel
  • 109
  • 1
  • 1
  • 10
2
votes
2 answers

Laravel and Arabic slugs

When creating a slug from a name, the slug is in English letters. Example: name = مقالة جديدة slug = mk-l-gdyd It should be: مقالة-جديدة Any idea how to solve this issue? I'm using this package. Model class Post extends Model { use HasSlug; …
Hamad Essa
  • 81
  • 6
2
votes
1 answer

Laravel 6: Throttle Password Reset

In laravel 6 the password broker now has the following to throttle password reset (https://github.com/laravel/framework/blob/6.x/src/Illuminate/Auth/Passwords/PasswordBroker.php#L58) public function sendResetLink(array $credentials) { // First…
adam78
  • 8,002
  • 17
  • 68
  • 154
2
votes
3 answers

Log in on 3rd party website using Laravel Passport

I need to solve the following problem: I created two applications using Laravel. Application A can be reached via https://test.example.org and provides a passport-instance and all user-data (Model: User). Application B can be reached via…
SPQRInc
  • 243
  • 1
  • 10
  • 23
2
votes
1 answer

Laravel 6.2 : I get the same Id from different data in index() method

I work with Laravel and I need to get some reservations from my database. I use the query builder : public function getReservation($date) { $reservations = DB::table('reservations') ->select('*') …
2
votes
2 answers

How to integrate Laravel with Nuxt js

As I am using Laravel as Backend and Nuxt js as Frontend I'm not able to use both together and also I'm not able to call any API from the frontend. So please help me if anyone knew about it. As I am using the below details for creating a project but…
1
2 3
15 16