Marcolino922 Marcolino922
2
Hi, I have results from the "items" table, associated with the "items_views" table, where it records each view. I would like to sort the results by most views in this code of mine, I know there is something simple but I can't find...
Hello there, I'd like to translate a queued mail, which is sent by an observer like this: <?php namespace App\Observers; use App\Mail\UserCreated; use App\User; use Illuminate\Support\Facades\Mail; /** * Class UserObserver * * @package App\O...
sirvantos sirvantos
9
As soon as i moved project (based on official Nova upgrade guide) on Nova 3.18.0 (from 3.8.0) i have faced with js error TypeError: e.cards is undefined on Dashboard. my steps: coping nova 3.18.0 to project nova folder php artisan nova:publish php...
gianmarx gianmarx
22
I have two controllers one called A and the other B. controller A has the storeA and update method controller B only storeB A's update method is called via api at the api / update link when the api / update is called I would like the storeB to be don...
Marinario Marinario
20
The way I implemented multilang is through middleware and routes. Middleware Localization.php looks like this: public function handle(Request $request, Closure $next) { $locale = $request->segment(1); if(empty($locale))...
uniqueginun uniqueginun
3
I was wondering what is the big string stored in payload column in sessions table used for?...
sr57 sr57
28
I wonder if anyone known how to 'remove' a collection from another with standard methods (I should be able to do it with foreach so it's answer I'm looking for) $col1=collect(['a','a','2','3','3','4']); $col2=collect(['a','2']); expected result : ['...
iroxbir iroxbir
36
In Controller, we write for get request Like this. For example: public function index(Request $request) { dd($request()->get('search')); But how to write for get request in Export Excel public function view(): View { dd(request()->get...
npalmqvist npalmqvist
6
Hi! Been playing around with Laravel 8 and the Job Batches. I think it's a great function but something that I'm missing is the functionality to delay the jobs as you can on the standard queue jobs (->delay(120)). Is this not possible at all with...
sr57 replied
Solved
Mick79 Mick79
6
I'm having some trouble tonight with @auth @else @endauth Is this removed from Laravel 8? Am I missing something? I'm trying to show one thing for logged in users and another thing for those not logged in....
Vable Vable
3
Hello Folks ! I'm trying to build a forum with Laravel, something with the same structure that myBB, and I'm stuck on how to notify users when a new reply or a new topic is posted since their last visit. In this forum, there is severals levels, again...
Faeza97 Faeza97
9
Please can someone help me converting this form to the HTML form? {!! Form::model($role, ['method' => 'PATCH','route' => ['roles.update', $role->id]]) !!} <div class="col-xs-12 col-sm-12 col-md-12">...
I have two models : user and city I checked the models names and their database structure but nothing looks to be strange. Here I'm supposed to get a user with his city User::with('city')->find($user->id); City model protected $fillable =...
Brainmaniac Brainmaniac
1
Hi, I have made a command that I want to use to in the terminal when I ssh to my server. In the command I have several artisan calls like this: \Artisan::call('<command>'). It works fantastically on my local machine. BUT when I try to run it on...
mehrdad70 mehrdad70
4
Hi, I want to set the ads so that each one is on its own page I have chosen three pages for ads home Single article Single Product But this code does not solve the problem and all ads are placed on the main page class Ads extends Model { protecte...
Troj Troj
13
I'm trying to return recently viewed items, on the homepage, for the visitor based on their session. But i think because of the duplicate session query, even when it's not the database driver i'm using, the results from the session are always returne...
app_dev app_dev
1
<template> <fragment> <HEADER v-if="screen"></HEADER> <MHEADER v-else></MHEADER> <div class="container-fluid viewContainer"> <router-view></router...
app_dev app_dev
2
How can I delete a single root element. I am using Bootstrap 5 and this is confusing....
krie9er krie9er
2
Hi I am wondering how many SQL-Queries are generated, when I map over a collections has many dependencies. Imagine following: Model Thing hasMany Foo; Model Foo has One Bar; Model Bar hasMany Foo; When I now make the following statement: Thing::fir...
Jessie25 Jessie25
3
Hey Guys, I have a question here. How can I passing the value inside student_info into university? This is how my API response looks right now "university": [ { "student_info": { "studentID": &quo...
Nimrod replied
Solved
bhhussain bhhussain
4
I am using the below code to convert the amount to words and it is working with the old PHP versions but when I use it with new PHP (ver 7.xxx) it is saying the error fix methods with the same name as their class will not be constructors in a future...
siangboon siangboon
4
This question had been asked before https://laracasts.com/discuss/channels/laravel/lts-or-latest-version-which-should-be-used but it's before Laravel follow Semantic Versioning... with the current versioning, Bug Fixes Until only six months from rele...
lemmon lemmon
5
Does anybody out there Use docker with phpstorm on windows WsL2? If so what do you think about it?...
leviathanz leviathanz
1
I tried to make a laravel upload image with this controller: public function addUser(Request $request){ $user = new User(); $user->lastName = $request->lastName; $user->firstName = $request->firstName; $user-&g...
farshadf farshadf
0
I have an application which is monolithic. Now I want to get the authenticated user in just like 2 apis in my application. I know that I can use laravel passport to generate tokens and get the user but I want to know if it's possible to get the authe...
I have a table: products: (id,title,description) categorys: (id,parent,name) product_categorys: (product_id, category_id) In the category I use multi level (parent,child). I want to display data by category. If I select a category with a level above...
nasrilbustami nasrilbustami
3
how to user bearer token to authenticate?any example...
ihprince ihprince
5
I am adding cart items into the cart via ajax. I want that when a user clicks on the add to cart button it redirects user to login page if he/she is not logged in. It redirects into xhr network section but not in view. Here is my ajax code $.ajaxSetu...
Jonjie Jonjie
5
I'm trying to use union() after I foreach the 2nd table. But it give me an error. Please see my code below. Code $customers = Customer::select(['email', 'name']); $clients = Client::select('email', 'name'])->get(); $total_clients = []; foreach($...
EMfinanga EMfinanga
2
Hello , How can i avoid duplication here? $tgl = Carbon::now()->format('Y-m-d'); $no = DB::select("SELECT max(right(bill_number,4)) as bill_no from sales WHERE date(updated_at)='$tgl'"); foreac...
jewelhuq jewelhuq
1
vendor\laravel\framework\src\Illuminate\Foundation\Console\ServeCommand.php:59 : now()->addDays(30)->getTimestamp(); $process = $this->startProcess(); while ($process->isRunning()) { if ($hasEnvironment) { clearstatcache(...
lemmon lemmon
0
Is anybody developing laravel with Docker VS code and WSL2? is so what do you think...
datlechin datlechin
1
I run cmd vue add vuetify and got this error ERROR Error: You cannot call "get" on a collection with no paths. Instead, check the "length" property first to verify at least 1 path exists. Error: You cannot call "get" o...
trevorpan trevorpan
1
$lowBid = $job->bids->firstWhere(min(['bid'])); ErrorException Trying to get property 'bid' of non-object So, this blade view has numerous states. When a job is initially posted (bid is not yet created and crashes view) When a bidder places...
app_dev app_dev
1
I need properly coded vue components. Where can I get them?...
Create a New Discussion Button