Laravel get count items by status

Hello. I have this code: $shops = Shop::where('user_id', Auth::user()->id)->byRating(); $p = $shops->where('status', 0)->count(); $a...

Laravel Forms

Hello my friends! I want to create a form where a user enters a number and after clicking submit button, this number to appear on the screen. I want to learn how to...

Validation

Example of Client side validation implemented in jQuery :- rules: { description: { require_from_group: [1, ".post-group"...

Issue with Vue Test Utils in Laravel

Hi all, i am trying to use the Vue Test Utils libraries for testing some Vue.JS components but I am facing issues when running the tests - following error message is...

How can I get the last digit in the url, laravel 5.5

How about, I have the following line dd(request()->headers->get('referer')); which shows me this "...

laravel syntax in vs code

i have a problem in vs code in paragraph tag any single quote misses the color of the entire code and i don't know how to fix it and it also makes the code very hard to kee...

Why cant we use app make inside job's constructor who implements queue

I have faced similar issue using app('class') inside job's construtor would give you an error . Same happens when you use place a default QUeue for MAIL and use app . Its l...

pls help. im dying to know

how after and before $next($request) in middleware works inside pipeline?...

How to secure my laravel app ?

I have a 4.2 laravel application i want to set a firewall using https://githu...

Can't change app default language

After a lot of struggling I coudln't change app's default language. What I have done: change locale attribute in config/app.php to: 'locale' => 'ar',...

Error with Office 365 Mail

Hello guys, So I'm trying to set up emails with Laravel and this is what my env looks like: MAIL_DRIVER=smtp MAIL_HOST=smtp.office365.com MAIL_PORT=587 MAIL_U...

Remove exception clutter from my Controller methods

Hi everybody, I'm tinkering with stripe to make payments through my app, currently I'm using try catch blocks and Stripe own Exception methods to get notified when somethin...

Exception when running "npm run watch-poll" after upgrading to 5.7

Hi, I've just upgraded from Laravel 5.6 to 5.7: followed the upgrade docs and implemented all changes using the GitHub comparison tool. I'm not using Vue but...
Mix
5
21

whereHas using muliple tables (or perhaps join)

Hi I have 3 tables. users, pages and user_groups Each user is part of a user group and on the table is a max_pages column. Now I need to get all users that still have not e...

Trait RefreshDatabase does not always refresh the database between tests

I have a few hundred tests in my project. My test environment is simply a different MySQL schema in the homestead database. <php&g...

How to connet remote mysql?

Hi Guys, I want to connect remote mysql. can you please help me out here....

Checking two different models and returning the results

Hi everyone, I am making a kind of auction website, and I only want to return a user's bids if the auction is still active. I can fetch the users bids, and I can fetch all...

send sms verification

I want to send the mobile confirmation code It can be done without the use of channels or events What is the difference between simple posting with channels or events? If I...

Eloquent Mutators and Accessors in Lumen

Hi Guys, I am trying to update a field, using "Mutators" change to database is not happening. Any Idea In controller $breakingNews =...
Lumen
3
23
Create a New Discussion Button
Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels