redroseamit redroseamit
30
while using port 465 then getting this error Expected response code 220 but got an empty response while using 587 Expected response code 250 but got code "530", with message "530-5.7.0 Authentication Required. Learn more at 530 5.7...
sr57 sr57
27
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 : ['...
Marinario Marinario
23
I'm trying to decrement like this on related hasOne trashed item but it throws me an error. $review->category->decrement('total_reviews'); The error: Call to a member function decrement() on null Can I decrement on related model which is tras...
sr57 sr57
23
$col1=collect('a','a','2','3'); $col2=collect('a','2','3','3'); What should be the smarter code to test than $col1 not equal to $col2?...
sr57 replied
Solved
gianmarx gianmarx
21
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...
connelblaze connelblaze
21
I have been stuck with this error for 2 days. comment model: class Comment extends Model { // protected $fillable = [ 'content', 'author_id', 'post_id', ]; public function author() { return $this->belongsTo(User::...
forratino forratino
19
my controller code: /** * Show the form for editing the specified resource. * * @param \App\AboutMes $aboutme * @return \Illuminate\Http\Response */ public function edit(AboutMes $aboutme) { $aboutme = AboutMes::find($aboutme->about_mes_id);...
Marinario Marinario
19
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))...
mecjos mecjos
18
Hi.. I want to broadcast an api resource collection (sometimes only resource) and I send it to event as argument broadcast(new JobUpdated($jobsCollection)->toOthers(); In event class I want to do something like below : use Dispatchable, Interact...
artisticre artisticre
17
Not sure how to fix this. Routes Route::get('/contact', [ContactUsFormController::class, 'createForm']); Route::post('/contact', [ContactUsFormController::class, 'ContactUsForm'])->name('contact.store'); Form <form method="post" act...
dipherent dipherent
17
Dear friends, I have a front page with job listings. The Job model has relationships with Company, Location, Category and Tags.. I used eager loading to send less queries to the db, but I don't know if this is the best I could do... I mean I am still...
ahmadsiddeeq0 ahmadsiddeeq0
17
hi i am new to laravel i just want to know if i am writing laravel the right way ! i have a small project that have users and each user has a posts and each post has comments so if i want to show all the comments i did something like that : $posts =...
MahmoudMonem MahmoudMonem
16
I am trying to show users that registration is being processing .. I thought of using jquery and following some tutorials this did pretty much look fine, but the problem is that the function is overlapping the submit action and the form is not being...
chrisgrim chrisgrim
16
Hi All! I am trying to only return the user when I hit the login route for laravel 8. I followed this tutorial https://talltips.novate.co.uk/laravel/laravel-8-conditional-login-redirects and so I have a LoginResponse.php file inside my App/Http/Respo...
iroxbir iroxbir
15
I have a notepad like this I want to import in excel ProductImport.php public function model(array $row) { return Product::updateOrCreate([ 'id' => $row['id'] ], [ 'title' => $row['title'] == 'NULL' ? null : $row['title...
Loach Loach
15
I am using a digital ocean spaces account which I believe has the same api as S3. I am wondering how I can protect the files from public download. I have some large 2 gig or more zip files I will need to protect. I will want the user to be able to do...
Loach replied
Solved
mohansharma mohansharma
15
I have created an accessor to modify a database value public function getImage1Attribute($value) { return $value ? asset('storage/hosts/images/' . $value) : null; } but I am still getting original value in JSON API like this { "message&q...
shkar-dev shkar-dev
14
actually i need to have separate tables but i don't want to use role as a column and insert all data in one table ....
AlexanderGor AlexanderGor
14
Hello! I have a table with the following column: $table->tinyInteger('wear_count')->default(7); I want to change its default value. Found out along the way that tinyInteger cannot be changed. I change with the following command: $table->smal...
devhoussam123 devhoussam123
14
2011-2021 uisng laravel ? 2011-{{ now()->year }}...
jlrdw replied
Solved
Create a New Discussion Button