Category : laravel-8

I have a Laravel application inside my website’s sub-folder (laravel). The structure is as follow: /css /images /js /laravel /app /Http /Controllers TaskController.php /Models User.php ..etc artisan /bootstrap /config server.php ..etc index.php I would like to make use of the class User.php and the CRUD functions in TaskController.php in my index.php. How can I do ..

Read more

Am trying to make a eCommorece project and I want to add filter dropmenues on the products table, to search from more than one database, but everytime I select an option I get this error below… https://flareapp.io/share/v5pzQz2P And here is the conde on the controller $products = Product::orderBy(‘id’, ‘desc’) ->where( function($query) use($request){ return $request->status_id ? ..

Read more

I’m testing the "Concurrent requests" feature: https://laravel.com/docs/8.x/http-client#concurrent-requests but I’m confused on how to create a closure input value dynamically. For example I’ve an array: $a = [ ‘foo’ => ‘http//localhost/1’, ‘bar’ => ‘http//localhost/2’ ]; and I need to create, dynamically, something like: use IlluminateHttpClientPool; use IlluminateSupportFacadesHttp; $responses = Http::pool(fn (Pool $pool) => [ $pool->as(‘foo’)->get(‘http://localhost/1’), $pool->as(‘bar’)->get(‘http://localhost/2’), ..

Read more

What seems to be the problem: Livewire mount seems to error out on me but diedumps fine. Steps to Reproduce: Just a simple rendering the route parameter to the commponent. Are you using the latest version of Livewire: Yes 2.4 My route Route::get(‘{name}’, Counter::class); My component blade file <div style="text-align: center"> <button wire:click="increment"></button> <h1>{{$name}}</h2> </div> ..

Read more

I have like this model: class Post extends Model { use HasFactory; protected $guarded = []; public function comments() { return $this->morphMany(Comment::class, ‘commentable’); } public function images() { return $this->morphMany(Image::class, ‘imageable’); } public function views() { return $this->morphMany(View::class, ‘viewable’); } public function category() { return $this->belongsTo(Category::class); } } With this query I’ll get posts: $posts ..

Read more

Laravel Version: 8.35.1 PHP Version: 8.0.0 Description: Before posting the question here I tried to find this answer but couldn’t find it. My Url is: http://127.0.0.1:8000/article/2021/03/from-farm-to-cup-mapping-the-journey-of-an-aspiring-20-year-old-entrepreneur I Just Want To Do That When Someone Change from-farm To from+farm It Automatically Changes Back To from-farm Or Any other dash(between slug) with any other sign like (* ..

Read more

this is my error IlluminateContractsContainerBindingResolutionException Target class [AppHttpControllersAppHttpControllersLandingController] does not exist. the code in route/web.php Route::resource(‘/’, LandingController::class); in my routeserviceprovider.php <?php namespace AppProviders; use IlluminateFoundationSupportProvidersRouteServiceProvider as ServiceProvider; use IlluminateSupportFacadesRoute; class RouteServiceProvider extends ServiceProvider { /** * This namespace is applied to your controller routes. * * In addition, it is set as the URL generator’s ..

Read more