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
2 answers

Combine data into one single variable laravel php laravel

I have three models: Country.php,Category.php and Region.php. All these models contains a common field named title in database. I want to extract the title field from each model and create an array variable, so that I can run it in foreach loop in…
psudo
  • 1,341
  • 3
  • 24
  • 69
0
votes
4 answers

Resource Route with parameter

I have resource route like this Route::resource('chapter', 'ChapterController'); I want to pass parameter id to it like this Route::resource('chapter/{id}', 'ChapterController'); and use it in my controller like this public function index($id) …
0
votes
1 answer

Laravel send all /admin/* to specific view

I am developing an website with simple landing, news and contact as frontend (using php is more that sufficient enough.. vuejs would be overkill...) and vue js as backend. Trying to send all request from /admin/* to view('admin'), this is the best I…
Webidew
  • 1
  • 1
0
votes
2 answers

Factories Not Found in Laravel 6

I'm stuck... I'm trying to get a set of factories working in Laravel 6, an continuously get the following error: InvalidArgumentException with message 'Unable to locate factory with name [default] [User].' There's several other posts about this on…
Aaron
  • 11
  • 1
  • 8
0
votes
0 answers

Convert PHP SQL Query to Laravel Eloquent

I have this PHP raw query that I would want to convert to Eloquent. SELECT telcos.id AS telco_id, telcos.name AS telco_name, telco_prefixs.prefix AS prefix, services.name AS service_name, services.id AS service_id, service_credentials.credentials AS…
user6721269
0
votes
1 answer

When I am logged in I want to see all users' information, other than the logged-in user, in Laravel?

home blade
Total Users: {{ $users->count() }}
@if (session('status'))
Farahnaz A
  • 3
  • 2
  • 6
0
votes
1 answer

php laravel 6 blade template

I’m studying Laravel 6 and there is always a problem with the blade template. The templates do not work: @csrf, @error ("name") $message @enderror, @method ("patch"), although constructs like @foreach, @forelse and @if work without…
Aleks
  • 1
  • 2
0
votes
0 answers

Validation of Phone Number using Laravel

i want to validate phone number like- 1.Only Bangladesh Mobile no is valid like, +880, 017,015,016,019,014 2 mobile no length also be valid like 11 digit if prefix is 01, 13 digit if prefix is 88, 14 digit if prefix is +880 so what is the…
0
votes
0 answers

Laravel authentication with Auth::attempt() inside AJAX call

I'm trying to authenticate a user through an AJAX call from login.blade.php to LoginController.php, into an authenticate() function. Code is as follows: Axios code inside login.blade.php (function(){ …
0
votes
3 answers

Search Where Has

So i have a Post table, where each post is in a album, i want to search by post attribute, but also bring the post's album in view, how do i do that? i've tried using this in controller $posts = album::whereHas('post', function($q) use ($search)…
Rznboth
  • 3
  • 2
0
votes
1 answer

Larave 6.x multidimensional arrays validation. old() function return empty array after validation

I have html-form that contains arrays. It has such structure: "q" => array:1 [▼ "new" => array:1 [▼ 1 => array:2 [▼ "name" => "a" "v" => array:2 [▼ 1 => array:1 [▼ "text" => "b" ] 2 => array:1 [▼ …
rela589n
  • 817
  • 1
  • 9
  • 19
0
votes
1 answer

temporary Signed Route end in specific date laravel

I have a table for Volunteer offers and I want to make link for the offers for Volunteers . I want the url ends in specific date.. i make this cod so far $url = URL::temporarySignedRoute( 'volunteer_apply', now()->addDays(),…
Anas
  • 37
  • 1
  • 9
0
votes
2 answers

Laravel 6.x, I'm trying change to the URL home to custom own URL. Because I'm building auth default login and registration

When I log-in the page it will redirect to the home page but I need and replace home to custom URL.also custom URL according to web.php file. In web.php file Route::get('/home', 'HomeController@index')->name('home'); Route::get('index/sign',function…
Mubashir
  • 75
  • 1
  • 3
  • 9
0
votes
1 answer

How to use (or) in laravel 6 for a query in the same table but in different columns?

How to perform queries in the Eloquent Laravel 6 database using "or" in columns of the same table? Example: I want to search for the word "coffee" in the "products" table in name, description and ean1 columns. how do I do this using Eloquent?
0
votes
2 answers

Laravel: return redirect after saving correctly throws SQLSTATE[23000]: Integrity constraint violation

I'm using Laravel 6.11 with MAMP and after saving correctly data form into my database table I got the following error. SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null (SQL: insert into products (name, price, …
ADM
  • 1,590
  • 11
  • 36
  • 54