Questions tagged [laravel-5.7]

Laravel 5.7 is the previous stable version of the open-source PHP web framework created by Taylor Otwell. It was released on September 4, 2018. Use it in addition to the [laravel-5] tag if your question is specific to Laravel 5.7. Use the [laravel] tag for general Laravel related questions.

Laravel 5.7 is the previous stable version of Laravel 5. It was released on September 4, 2018.

What is new:

  • Email Verification
  • Guest User Gates / Policies
  • Symfony Dump Server
  • Notification Localization
  • Console Testing
  • URL Generator & Callable Syntax
  • Paginator Links
  • Filesystem Read / Write Streams

Resources:

1390 questions
4
votes
0 answers

Laravel - Issues with Vue and Javascript

Using Laravel 5.7 Buefy 0.7.3 Vue 2.5.17 In my project, I have a sidebar which has elements that slide down up with javascript code .. and in my page, I have a Tab from Buefy Now I notice that every page contains any Vue object .. the javascript…
John Deck
  • 787
  • 1
  • 12
  • 27
4
votes
2 answers

Laravel Eloquent Inner Join on Self Referencing Table

I'm trying to inner join a users table to itself using an eloquent model. I've looked everywhere but can't seem to find a solution to this without creating two queries which is what I am currently doing. A users table has a many to many relationship…
4
votes
2 answers

Laravel Route::current() returns null

I am trying to use the current route in middleware in Laravel 5.7 using the following line of code: $route = Route::current(); But I get a null value for $route. Any ideas?
Farzan Badakhshan
  • 373
  • 1
  • 5
  • 19
4
votes
1 answer

Session not storing data in Vue.js & Laravel

I am trying to store data into the Laravel session on each AJAX call from the vue.js. I want to add a product in Laravel cart using session but it's not storing any kind of session data. I have also added web middleware but no luck. api.php
Mayank Dudakiya
  • 3,635
  • 35
  • 35
4
votes
2 answers

How to pass parameter in Laravel Relationship Function within blade?

Student.php It has many fees class student extends Model{ public function fees($round){ return $this->hasMany(fee::class)->where('payment_round','=',$round); } } Fee.blade.php @foreach($student->fees("parameter") as $fee) …
Aman
  • 2,316
  • 3
  • 17
  • 23
4
votes
3 answers

Laravel 5.7 pagination showing but not returning the correct data when changing page

Here is my route: Route::namespace('Admin')->prefix('admin')->name('admin.')->middleware(['auth', 'auth.admin'])->group(function () { Route::prefix('users')->group(function() { Route::get('/', 'UserController@index')->name('user'); In my…
twigg
  • 3,753
  • 13
  • 54
  • 96
4
votes
4 answers

Count data from database on laravel

On php i could use this code to get how many item on my goods db $total = 0; $sql = "select count(*) as total from goods"; $result = $conn->query($sql); if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { $total =…
4
votes
1 answer

Add varchar column type with SQL Server using Laravel

I'm using Laravel 5.7 along with SQL Server 2017 and I want to generate a varchar(50) column called name. Executing this code gives me a nvarchar(50) instead: Schema::create('test', function(Blueprint $table) { $table->string('name',…
4
votes
2 answers

Laravel Route Model Binding: destroy method not grab necessary info

Here is my controller for ProducerType model: namespace App\Http\Controllers; use App\ProducerType; use App\Http\Requests\ValidateProducerTypes; use Illuminate\Http\Request; class ProducerTypeController extends Controller { public function…
marcelo2605
  • 2,734
  • 4
  • 29
  • 55
4
votes
3 answers

Laravel 5.7 validate fields with asterisk, required_if

I have a Vue form that let users add work experience for there profile. Users can add extra experience by clicking on a button. Clicking on that will add an new item with new input fields. I can't add the whole script because it's quit big. But here…
Ruub
  • 619
  • 1
  • 13
  • 41
4
votes
2 answers

Laravel Parameter in every url

I have read almost everything in web and documentation but i can't find solution for my Problem. I have a variable stored in Session , then I want to put this variable in every url generated by route('some-route') . In Session I have sub =…
Malkhazi Dartsmelidze
  • 4,783
  • 4
  • 16
  • 40
4
votes
2 answers

Bootstrap 4 Installation With Laravel 5.7

I am trying to compile my app.scss file that comes with my new project from Laravel, but I want to install Bootstrap 4. At the time of doing my npm run dev does not install Bootstrap 4, but it still has the Bootstrap that Laravel brings by…
Pablo Curumaco
  • 41
  • 1
  • 1
  • 4
4
votes
7 answers

Laravel 5.7 - CSS and JS not loading using URL::asset

I am new in laravel. I setup laravel 5.7 on my local system and put js and css into public folder but when hitting my site url on browser, site is not loading any css and js. Site structure : app bootstrap config database public -css -js …
Ankit
  • 627
  • 1
  • 9
  • 22
4
votes
1 answer

Class does not exist reflection exception error in laravel 5.7

my api.php Route::get('getProducts' , 'ProductController@getProducts'); ProductController.php
Vijay
  • 139
  • 1
  • 9
4
votes
5 answers

How To Add Title For Each Page In Laravel

In my laravel website all pages having same title meta but how to make different title for each page please tell me. this is my code for dynamic showing in all the pages {{setting('site.title')}} | {{setting('site.description')}} …</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/laravel" class="post-tag grid--cell" title="show questions tagged 'laravel'" rel="tag">laravel</a> <a href="../../questions/tagged/laravel-5.6" class="post-tag grid--cell" title="show questions tagged 'laravel-5.6'" rel="tag">laravel-5.6</a> <a href="../../questions/tagged/laravel-blade" class="post-tag grid--cell" title="show questions tagged 'laravel-blade'" rel="tag">laravel-blade</a> <a href="../../questions/tagged/laravel-5.7" class="post-tag grid--cell" title="show questions tagged 'laravel-5.7'" rel="tag">laravel-5.7</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Dec 08 '18 at 06:21">asked Dec 08 '18 at 06:21</time> <a href="../../users/10754809/srashti-sharma" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/10754809.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Srashti sharma" /> </a> <div class="s-user-card--info"> <a href="../../users/10754809/srashti-sharma" class="s-user-card--link">Srashti sharma</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">57</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="1 silver badge">1</li> <li class="s-award-bling s-award-bling__bronze" title="5 bronze badge">5</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/laravel-5.7_page=5" rel="prev" title="Go to page 5">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/laravel-5.7_page=1" rel="" title="Go to page 1">1</a> <a class="s-pagination--item" href="../../questions/tagged/laravel-5.7_page=2" rel="" title="Go to page 2">2</a> <a class="s-pagination--item" href="../../questions/tagged/laravel-5.7_page=3" rel="" title="Go to page 3">3</a> <div class="s-pagination--item s-pagination--item__clear">…</div> <a class="s-pagination--item" href="../../questions/tagged/laravel-5.7_page=92" rel="" title="Go to page 92">92</a> <a class="s-pagination--item" href="../../questions/tagged/laravel-5.7_page=93" rel="" title="Go to page 93">93</a> <a class="s-pagination--item" href="../../questions/tagged/laravel-5.7_page=7" rel="next" title="Go to page 7"> Next</a> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>