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

How can I add Laravel Crinsane cart data as an order?

In order to create an order from Crinsane based cart and associate it to the (authenticated) user, I created Order model and tried the following in order controller.
0
votes
2 answers

Laravel get value from 2 column with relationship one to one

I have 2 tables and have relationship one to one. Second table use a FK from first one, and I want to display a list with all values . public function index(Request $request) { $listOfPersons = new Person(); $listOfRegisters = new …
Beusebiu
  • 1,433
  • 4
  • 23
  • 68
0
votes
1 answer

How to specify name for routes of a resource route

My need is that if in case I changed the route Route::resource('/admin/users','AdminUserscontroller'); TO: Route::resource('/admin/admin_users','AdminUserscontroller'); I have to change all the anchor tag link one by one,, How to avoid that? MY…
0
votes
1 answer

Select 2 jQuery doesn't work in laravel 6

So I am trying to create a form where the user can add a book to the database. I wanted to use the select bars from Select2, which allow the user to search for the select elements. I followed a tutorial on how to make this work, but somehow it…
mekol
  • 31
  • 5
0
votes
2 answers

Laravel Slug Duplicate

when i trying to create post with the same slug it create post normally also in update the same problem in this case i'v duplicate slugs for post i search a lot about this problem but i didn't get any answers any idea to solve this problem…
Hamad Essa
  • 81
  • 1
  • 8
0
votes
0 answers

Laravel Login Endpoints Hits multiple times when Login

I have main domain which is register.laravel.com, where user can register themselves with their choice of domain for ex: foo here On Successful registration, the user can visit foo.laravel.com, which connects to a specific database, which I have…
Rehan
  • 3,813
  • 7
  • 37
  • 58
0
votes
1 answer

preg_replace(): Compilation failed: invalid range in character class at offset 11 in Laravel Slug

i'm building an Arabic Slug system form my Blog App when i add a new Slug i got this error preg_replace(): Compilation failed: invalid range in character class at offset 11 controller public function slug($string, $separator = '-') { if…
Hamad Essa
  • 81
  • 1
  • 8
0
votes
1 answer

Not being able to pass values into database from eloquent relationships in laravel 6

I am working on my first laravel project, which is a library application. I am now working on a form to create a book, and I had to create many eloquent relationships here. I created the relationship languages to books, which was easy, because one…
mekol
  • 31
  • 5
0
votes
1 answer

Stripe payment charge

I want to charge payment using paymentMethod as a source but it does not charge, how do I get token as the source using payment method? I tried to charge using \Stripe\Stripe::setApiKey('sk_test_**************'); \Stripe\Charge::create([ …
0
votes
1 answer

Creating a seeder in Laravel 6 that works with foreign key constraint

I am trying to create a seeder that fills a databases with "Assignments" that are linked with a "Course" database with foreign key constraint. Since i am pretty new to PHP and Laravel 6 in general i don't really know where to start. I allready have…
Senenter
  • 23
  • 1
  • 1
  • 5
0
votes
0 answers

laravel 6 redirect back to page after login using socialite package

laravel 6 redirect back to the previous page after login using socialite package. How can I achieve this with the following code? protected function redirectTo(){ return url()->previous(); } public function…
Upasana Chauhan
  • 948
  • 1
  • 11
  • 32
0
votes
1 answer

Authenticated method in Laravel 6

I'm using Laravel 6. I want to generate a new API token for the user each time the user logged in. Referring to some answers on StackOverflow, there is a method authenticated in LoginController which is been called just after the user is logged in…
fahad shaikh
  • 593
  • 1
  • 14
  • 29
0
votes
1 answer

laravel 6 npm run dev failed

I recently start learning laravel and already did 2 project, but suddenly the NPM RUN DEV failed when i create new laravel 6 project. I can still run my old project and also already tried rm -rf node_modules && npm cache clean --force && npm…
Eric Sugiharto
  • 21
  • 1
  • 12
0
votes
3 answers

User Data is not saving to Database in Laravel 6

User Data is not saving to Database in Laravel 6. I am using socialite to save data to the database with the following code lines. protected $fillable = [ 'email','name','password','username','picture' ]; In the login controller. I am able to…
Upasana Chauhan
  • 948
  • 1
  • 11
  • 32
0
votes
1 answer

Laravel Valiadtion array must have one element with a certain value

Imaging having the following input for a form request validation. [ 'relations' => [ [ 'primary' => true, ], [ 'primary' => false, ], ], ], Is there…
mrhn
  • 17,961
  • 4
  • 27
  • 46