Laravel: Too few arguments to function Illuminate\Support\Manager::createDriver()

I try to test emails with mailtrap and Laravel 5.4. I get this error: Type error: Too few arguments to function Illuminate\Support\Manager::createDriver(), 0 passed in C:\Users***\Documents\www\***\backend\vendor\laravel\framework\src\Illuminate\Support\Manager.php on line 88 and exactly 1 expected I already tried to config:cache, config:clearetc. Here is what php artisan tinkerreturns when I echo env(‘MAIL_DRIVER’) smtp Here is my .env file MAIL_DRIVER=smtp MAIL_HOST=mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=********* […]

Read More

Laravel Dynamic Breadcrumb

This worked for me, tried in Laravel 5.4.* Requirement for this code to work flawlessly: All URL’s should have hierarchy pattern in your routes file Below code will create crumb for each path – <a href=”/”>Home</a> > <?php $link = “” ?> @for($i = 1; $i <= count(Request::segments()); $i++) @if($i < count(Request::segments()) & $i > […]

Read More

Please provide a valid cache path – Laravel Error

Laravel often throw this error due to it cannot find a storage cache folder, You need to rebuild the storage folders, they are in your .gitignore file so wont be copied when you clone a project (as they are never pushed to the repo).   Try the following: create these folders under storage/framework: sessions views cache Now […]

Read More

How to create template in Laravel

To create a template in laravel go to following folder :- views/layouts and create a file yourtemplate.blade.php and paste the following code @include(‘includes.dashboard.header’) @include(‘includes.dashboard.sidebar’) @yield(‘content’) @include(‘includes.dashboard.footer’) Include word determines the file for header, sidebar and footer then you can create the respective files there   to add the content you can call this template directly […]

Read More

Receiving GET/POST Data In Laravel 5.7

How to receive GET/POST Data in Laravel 5.7 Step 1 :- Create a basic form login.php in resource/views/ folder :- <form action=”/login” method=”post”> <div class=”form-group”> <label for=”email”>Email:</label> <input type=”email” class=”form-control” id=”email” placeholder=”Enter email” name=”email”> </div> <div class=”form-group”> <label for=”pwd”>Password:</label> <input type=”password” class=”form-control” id=”pwd” placeholder=”Enter password” name=”pwd”> </div> <div class=”checkbox”> <label><input type=”checkbox” name=”remember”> Remember me</label> </div> […]

Read More

Everything about CSRF Protection Laravel

If you’ve tried to create and submit a form in a Laravel application already you’ve likely run into TokenMismatchException. in many cases you will try to disable the CSRF protection and then move on buy is that really worth. Laravel takes care of the security very seriously..So sit back and relax this post is going to […]

Read More