Questions tagged [laravel-6]

Laravel 6.0 is a past main version of the open-source PHP web framework created by Taylor Otwell. It was released on September 3, 2019. Use the [laravel] tag for general Laravel related questions.

Laravel 6.0 (LTS) continues the improvements made in Laravel 5.8 by introducing semantic versioning, compatibility with Laravel Vapor, improved authorization responses, job middleware, lazy collections, sub-query improvements, the extraction of frontend scaffolding to the laravel/ui Composer package, and a variety of other bug fixes and usability improvements.

What is new:

  • Semantic Versioning
  • Laravel Vapor Compatibility
  • Improved Exceptions Via Ignition
  • Improved Authorization Responses
  • Job Middleware
  • Lazy Collections
  • Eloquent Subquery Enhancements
  • Laravel UI

Resources:

1918 questions
0
votes
1 answer

BindingResolutionException: Target class [path\to\class] does not exist (Laravel 6)

I'm using Laravel 6 and php 7 along with ReactJS. I'm following Build a Basic CRUD App with Laravel and React tutorial to learn how to make a CRUD app. In the tutorial, it says that I need to enable CORS so the API can be accessed from the front-end…
Aufa
  • 3
  • 1
0
votes
1 answer

Call to a member function diffForHumans() on null only in "updated_at"

In my User model I have created_at and updated_at columns. When I cast the created_at successful but when I cast the updated_at it returns an error below: protected $appends = ['created_at_formatted', 'updated_at_formatted']; public function…
schutte
  • 1,949
  • 7
  • 25
  • 45
0
votes
2 answers

Laravel returns 404 on a edit route (Laravel 6.11.0)

I have created the following route. Route::resource('admin/products/', 'ProductsController')->middleware('auth'); I've used Artisan to create a controller with all the methods (index, create, edit, etc). When I use the command php artisan…
Bojan
  • 83
  • 9
0
votes
3 answers

Correct way to set up this Laravel relationship?

I'm after a bit of logic advice. I am creating a system where users login and register their participation at an activity. They can participate at an activity many times. What is the best way to do this? I want to ensure I can use eloquent with this…
user3274489
  • 186
  • 2
  • 4
  • 15
0
votes
2 answers

Page loading on ajax pagination in Laravel

I am trying to implement ajax pagination. but ajax pagination is loading perfectly when I am clicking on the second page button. but when I am clicking on the third-page button it's reloading the whole page. Here is the search function public…
Upasana Chauhan
  • 948
  • 1
  • 11
  • 32
0
votes
0 answers

Laravel Project Not Running On Server

I have deployed my laravel project on server. When I hit the url it gives me error but no log is generated in log folder. This page isn’t working [Domain Name] is currently unable to handle this request. HTTP ERROR 500 I have moved the public…
fahad shaikh
  • 593
  • 1
  • 14
  • 29
0
votes
1 answer

InvalidArgumentException : Database [s_request] not configured

I'm trying to migrate multiple migration tables into multiple databases I'm getting this kind of error: // If the configuration doesn't exist, we'll throw an exception and bail. 149| $connections = $this->app['config']['database.connections'];…
0
votes
1 answer

Getting "Trying to get property 'subtotal' of non-object" when using findOrFail

I've got the following piece of code in a service: public function add(array $data) : Order { // retrieve item data $item = MenuItem::findOrFail($data[OrderItem::ORDER_ITEM_ITEM_ID]); $quantity =…
MrCujo
  • 1,218
  • 3
  • 31
  • 56
0
votes
1 answer

Laravel blade @includeWhen gives me Undefined variable error

When I do like this @includeWhen($category, 'modules.breadcrumbs') I got error Undefined variable: category So I can do it only using the old way @isset ($category) @include('modules.breadcrumbs') @endisset But I cannot understand why?
schel4ok
  • 634
  • 1
  • 11
  • 33
0
votes
1 answer

Laravel Mix doesn't include bootswatch in app.css bundle

I'm trying to include the bootswatch flatly theme in my laravel/react project and no matter what I do, the bootswatch css doesn't end up in the public/app.css file as I'd expect. I ran npm i bootswatch and I've verified that I have bootswatch:…
hyphen
  • 2,368
  • 5
  • 28
  • 59
0
votes
1 answer

middleware conflicts with controller __construct middleware (request validation error not working)

I am using middleware for user roles. But when I am using middleware in Controller __construct method, request validation does not work properly. It doesnt show any errors, session error bag returns null. I am not able to see any errors when form…
tyasird
  • 926
  • 1
  • 12
  • 29
0
votes
2 answers

Laravel 6 - login with Phone or Email

I'm using Laravel 6 and want user can alternatively login by email or mobile. My attempts so far: Migration is working fine. Registration is working fine Login works fine one at a time either email or mobile with below changes in…
Balram Sharma
  • 119
  • 1
  • 3
  • 15
0
votes
2 answers

How to set up an internal laravel website Messaging Database correctly

I am struggling to setup my messaging database. I am allowing users to message each other through my site. When a user goes to their message panel I want the database to return data like this 1[ Message with sender_id = 1 and sent_to_id = 2 body =…
chris
  • 51
  • 7
0
votes
1 answer

Setting up AWS S3 bucket permissions

I have an S3 bucket (e.g. mybucket) which currently has permissions set as follows: Block all public access On | |_Block public access to buckets and objects granted through new access control lists (ACLs) | On | |_Block public access to…
adam78
  • 9,668
  • 24
  • 96
  • 207
0
votes
1 answer

Search is not working although item exists in DB

I am using laravel 6 : need user to find records by search bar, but it shows No Available Records enter image description here this in my model:Category model: public function scopeWhenSearch($query, $search) { return $query->when($search,…
shaza
  • 37
  • 11