Questions tagged [laravel-5.7]

Laravel 5.7 is the previous stable version of the open-source PHP web framework created by Taylor Otwell. It was released on September 4, 2018. Use it in addition to the [laravel-5] tag if your question is specific to Laravel 5.7. Use the [laravel] tag for general Laravel related questions.

Laravel 5.7 is the previous stable version of Laravel 5. It was released on September 4, 2018.

What is new:

  • Email Verification
  • Guest User Gates / Policies
  • Symfony Dump Server
  • Notification Localization
  • Console Testing
  • URL Generator & Callable Syntax
  • Paginator Links
  • Filesystem Read / Write Streams

Resources:

1390 questions
10
votes
2 answers

Laravel Service Container and Service Provider

Need to understand Laravel service container and service provider through an example.
Ravinesh
  • 119
  • 1
  • 1
  • 3
10
votes
3 answers

Laravel No Existing Directory at "storage/logs"

I want to run a Laravel 5.7 application with Docker. My containers start OK but when I try to run the app in the browser I get an error. There is no existing directory at "/Users/user/projects/laravel/application/storage/logs" and its…
Anastasia
  • 315
  • 1
  • 3
  • 13
9
votes
5 answers

Delete Redis Keys matching a pattern Laravel 5.7

I have been searching and tried multiple solution but could got any helping results, I want to clear/delete all keys matching pattern products:*. Following are the things i have tried.…
Noman Ali
  • 3,160
  • 10
  • 43
  • 77
9
votes
3 answers

How to Optimize Import Process for very large data for Laravel?

I have the functionality to import a very large amount of records around 5 million. I have to make entries for related tables also simultaneously in the import process. I have to make bunch insert queries for new entries and taking care of all…
Vivek Solanki
  • 136
  • 1
  • 13
9
votes
1 answer

Location of auth:api Middleware

Can somebody please tell the location of auth:api middleware? As per the auth:api middleware, the api routes are protected by not null users. I have a boolean field in user table called Is_Admin_Url_Accessible. I want to add a condition in the…
Pankaj
  • 9,749
  • 32
  • 139
  • 283
9
votes
4 answers

Laravel Passport Multiple Authentication using Guards

Can we use laravel passport with different guards to authenticate APIs for two different types of users. For example we have driver app for driver user and vendor app for vendor user. Both have their different models Driver and Vendor. How can we…
8
votes
3 answers

How to use triggers in laravel?

My code, using PHP artisan make: migration create_trigger command public function up() { DB::unprepared(' CREATE TRIGGER roll_no BEFORE INSERT ON `students` FOR EACH ROW BEGIN SET @roll_num = IFNULL((substring((SELECT student_roll_no FROM…
HARIKRISHNA
  • 89
  • 1
  • 1
  • 3
8
votes
1 answer

Get mime type of image from storage?

I'm getting a file from storage using: $image = Storage::get('test.jpg'); How can I get it's mime type? I've tried: $mime = Storage::mimeType($image); With no luck. I need the mime type so I can return the image as a response: $response =…
panthro
  • 22,779
  • 66
  • 183
  • 324
8
votes
2 answers

Where do put classes in Laravel?

I'm doing my first project trying to learn Laravel and I've come to the point where I want to create an object. I've created it and tried it out and it works as I want it to, but where do I put it? As of now it lies directly in my controller, but…
wenzzzel
  • 643
  • 2
  • 6
  • 17
8
votes
3 answers

Laravel 5.7 email verification expiration time

I would like to customize the time users have to verify their email address that happens through the built in Auth (since 5.7). In config/auth there is: 'passwords' => [ 'users' => [ 'provider' => 'users', 'table' =>…
eskimo
  • 2,421
  • 5
  • 45
  • 81
8
votes
1 answer

How to write to a .txt file in Laravel?

I want to get the value of activationCode from database and then store it into a .txt file. This is what I tried to so far. Please help! registerController.php protected function create(array $data) { $user = User::create([ …
Shamima Saleem
  • 143
  • 1
  • 1
  • 9
8
votes
4 answers

How to queue Laravel 5.7 "email verification" email sending

Laravel 5.7 included "email verification" feature works well but not async email sending (during user register or resend link page) is not ideal. Is there any way to send the email verification email through a queue without rewrite whole email…
François
  • 133
  • 1
  • 6
8
votes
3 answers

Changing the default “Subject” field for verification emails in Laravel 5.7

I'm trying to change the default subject field in the verification email that comes with Laravel 5.7. How and where do I change it? I have searched all over the place and online. Because it's brand new I can't find an answer.
GabMic
  • 1,422
  • 1
  • 20
  • 37
7
votes
1 answer

Why I cannot assert that the job has been dispatched?

I have the following Laravel Controller: namespace App\Controller; use App\Jobs\MyJob; class JobDispatchControler { public function callJob(Request $request) { MyJob::dispatch(); } } The controller above has the following…
Dimitrios Desyllas
  • 9,082
  • 15
  • 74
  • 164
7
votes
1 answer

PDF attachment not showing in mailtrap HTML output but showing in RAW section - Laravel 5.7

I find out that the Pdf I attached to my email does not show when delivered to my email in Mailtrap but it shows in the RAW data section. My Controller Method to send an email: public function store(Request $request) { $this->validate($request,…
OlaJ
  • 608
  • 7
  • 15
1
2
3
92 93