Category : laravel-8

I’m struggling to figure out how to implement 2FA provided by Laravel/Fortify (https://github.com/laravel/fortify) without using Jetstream. Currently there is no documentation regarding how to do it. I have the twoFactorAuthenication enabled in the config/fortify.php ‘features’ => [ // Features::registration(), // Features::resetPasswords(), // Features::emailVerification(), // Features::updateProfileInformation(), Features::updatePasswords(), Features::twoFactorAuthentication([ ‘confirmPassword’ => true, ]), ], I have registered ..

Read more

I can’t see errors when i try the named error bag. Can someone help me? Thanks. (Laravel 8) Controller $request->validateWithBag(‘contactform’, [ ‘name’ => ‘required’, ’email’ => ‘required|email’, ‘subject’ => ‘required’, ‘message’ => ‘required’, ]); View @if($errors->any()) <div class="uk-alert uk-alert-danger"> <a class="uk-alert-close" uk-close></a> <h3 class="uk-text-light">There was an error while sending contact form.</h3> @foreach($errors->contactform->all() as $error) <p>&mdash; ..

Read more

I already got my route:list (output shown below): But when I try to call via postman, it seems that it doesn’t work: Sorry if this is a dumb question but it was previously working on Laravel 7 but now not working on 8. I’m hoping someone can help me through this. Thanks. Sourc..

Read more

I’m creating a Laravel 8 package and have a few controllers. I’d like to group some common functionality into a single controller and utilise them elsewhere, so I’ve created a UtilityController.php controller inside of packages/company/package/src/Http/Controllers. I have some other controllers in here as well which I’m trying to extend from the UtilityController. This however isn’t ..

Read more

In layout folder I have a file named "app.blade.php". To render some content from other balde file I wrote in the file @yield(‘content’) I created another file in "views/admin" name "dashboard.blade.php". Written code in this file is @extends(‘home’) @section(‘content’) Test text @endsection But content doesn’t load in "app.blade.php" file thus nothing in @yield(‘content’) section What ..

Read more

I created an api which is delivered with package development composer. in Laravel 7 it was possible to add the route model binding with: Route::group([‘namespace’ => ‘AcmePackageappHttpControllersApi’], function () { // fomer possibility: Route::apiResource(‘api/comments/’, ‘CommentController’)->middleware(‘bindings’);}); In Laravel 8 that’s not possible anymore. I’ve tried almost everything the last days, but either the route-model-binding is not ..

Read more

I uploaded my localhost project on Godaddy Shared hosting. After uploading my project i got this error file_put_contents(C:xampphtdocsinstantstorageframework/sessions/FF): failed to open stream: No such file or directory to remove this error i followed this Stackoverflow answer and deleted my bootstrap/cache/config.php I have two questions – will there be any effect on performance if i delete ..

Read more

We are sending emails via sendgrid/sendgrid php package. While this worked well until last week on Laravel 6, it seems like Sengrid does not receive receipients added via $email->addTo("[email protected]", "Foo Bar"); anymore. We upgraded vom laravel6 to laravel8 last week, however I doubt that this is really related. $email = new Mail(); $email->setTemplateId(‘myTemplateId’); $email->setFrom(‘[email protected]’, ‘Contact ..

Read more

I’m trying to send a notification from a laravel 8 app." When I hit the URL I get the error. ** syntax error, unexpected ‘)’ ** In the route file : Route::get(‘/twitter’, function (){ Notification::route(TwitterChannel::class,”)->notify(new TestNotification()); }); In notification file public function via($notifiable) { return [TwitterChannel::class]; } public function toTwitter($notifiable) { return new TwitterStatusUpdate(‘Laravel notifications ..

Read more

Hi i don`t know to broken variable {{header} in Laravel pls help my. I show this code here: <body class="font-sans antialiased"> <div class="min-h-screen bg-gray-100"> @livewire(‘navigation-dropdown’) <!– Page Heading –> <header class="bg-white shadow"> <div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8"> {{ $header }} **<–this line is error and again type of variable** </div> </header> <!– Page ..

Read more

when run php artisan db:seed getting error like this IlluminateContractsContainerBindingResolutionException Target class [databaseseedersLaratrustSeeder] does not exist. at D:xampphtdocsmnservicevendorlaravelframeworksrcIlluminateContainerContainer.php:811 807▕ 808▕ try { 809▕ $reflector = new ReflectionClass($concrete); 810▕ } catch (ReflectionException $e) { ➜ 811▕ throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e); 812▕ } 813▕ 814▕ // If the type is not ..

Read more

I Laravel 8.x app where the API endpoints have broken for some reason and are now returning the wrong response type. They were working fine previously and nothing has changed in the source code. The API request: axios.get(`/${this.model}/emptyTopics`, { params: params }) .then(r => { if(r.status == 200 || r.collection.length) { this.emptyTopics = r.data.collection; this.emptyTopicsDataTable.loadingVal ..

Read more

I’m trying to add a new Livewire component to Laravel 8 Jetstream but looks I’m doing some mistake and getting the following error. Error: [![error][1]][1] LivewireExceptionsRootTagMissingFromViewException Livewire encountered a missing root tag when trying to render a component. When rendering a Blade view, make sure it contains a root HTML tag Route: // web.php Route::middleware(‘auth’)->group(function() ..

Read more

I’m trying to add a new Livewire component to Laravel 8 Jetstream but looks I’m doing something wrong and getting the following error. Error: LivewireExceptionsRootTagMissingFromViewException Livewire encountered a missing root tag when trying to render a component. When rendering a Blade view, make sure it contains a root HTML tag Route: // web.php Route::middleware(‘auth’)->group(function() { ..

Read more

So me and a friend are working on a admin-view for user management. I wanted this view to option to be able to delete users by clicking a button. The userlist itself looks like this: @section(‘main’) @csrf <ul class="collapsible"> @foreach($users as $user) <li method="POST" action="delete"> <div class="collapsible-header"><i class="material-icons">face</i>{{$user->fname}} {{$user->lname}}</div> <div class="collapsible-body" id="{{$user->id}}"> <p>Adresse: {{$user->address1}}, {{$user->postalcode}} ..

Read more

I have been reading the Laravel documentation. There it is explicitly written that If your queued job accepts an Eloquent model in its constructor, only the identifier for the model will be serialized onto the queue. When the job is actually handled, the queue system will automatically re-retrieve the full model instance and its loaded ..

Read more