1,610 experience to go until the next level!
In case you were wondering, you earn Laracasts experience when you:
Earned once you have completed your first Laracasts lesson.
Earned once you have earned your first 1000 experience points.
Earned when you have been with Laracasts for 1 year.
Earned when you have been with Laracasts for 2 years.
Earned when you have been with Laracasts for 3 years.
Earned when you have been with Laracasts for 4 years.
Earned when you have been with Laracasts for 5 years.
Earned when at least one Laracasts series has been fully completed.
Earned after your first post on the Laracasts forum.
Earned once 100 Laracasts lessons have been completed.
Earned once you receive your first "Best Reply" award on the Laracasts forum.
Earned if you are a paying Laracasts subscriber.
Earned if you have a lifetime subscription to Laracasts.
Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.
Earned once you have achieved 500 forum replies.
Earned once your experience points passes 100,000.
Earned once your experience points hits 10,000.
Earned once 1000 Laracasts lessons have been completed.
Earned once your "Best Reply" award count is 100 or more.
Earned once your experience points passes 1 million.
Earned once your experience points ranks in the top 50 of all Laracasts users.
Earned once your experience points ranks in the top 10 of all Laracasts users.
Replied to LoginUsingId Failure
Did you trying to login from an authenticated session? If yes I think this will not work. Also since the $request is an object, you cannot access the user_id as array.
select()
function should be an array.
Language::where('Status', true)->select(['Name', 'Locale', 'Status', 'Country', 'Direction'])->get()->toArray();
Replied to Custom Validation Error Formating
Hope this will hel you. https://laravel.com/docs/8.x/validation#named-error-bags
Replied to Laravel Subdomain Authentication Issue
Did you cleared your cache after setting the SESSION_DOMAIN to something else?
Replied to MIssing Parameter When Using Sub Domain Routing
I think you have to pass subdomain to login route. Since you are passing $subdomain as parameter.
Awarded Best Reply on Migration Error: SQLSTATE[HY000]: General Error: 1215 Cannot Add Foreign Key Constraint
check your migration and confirm container
and route_list
migration are running before container_logs
migration.
Replied to Undefined Index
Check the array after combine () function. I think the index is missing after the combine. Or the excel you are importing doesn't have a value for cavo
Awarded Best Reply on Getting SetTrustProxies() Error After Aplication Upgraded To 8.x
I was missing the second parameter to pass in the setTrustedProxies()
function after the update.
Replied to Getting SetTrustProxies() Error After Aplication Upgraded To 8.x
I was missing the second parameter to pass in the setTrustedProxies()
function after the update.
Awarded Best Reply on Laravel Validation Problem With Uploaded Image
$request->validate([
'companiesLogos' => 'required|file|size:512|mimes:png,jpg',
]);
change your validation and check.
Replied to How To Use Bootstrap 5 (RTL Or LTR) Based On Locale On A Multilingual Website?
I think you have to set the dir
property on the html tag according to your locale. So if it is RTL then the html would be
<html dir='RTL'>
and LTR
<html dir='LTR'>
Replied to Unlink AWS Image File
From the docs https://laravel.com/docs/8.x/filesystem#deleting-files. if you want to delete the file from s3
you can use
Storage::disk('s3')->delete('path/file.jpg');
Replied to How To Validate Request Using Ajax?
If I understood your problem correctly, You can add additional rules like min:3
, max:255
, to the validation. A full list of validation rules can be found here https://laravel.com/docs/8.x/validation#available-validation-rules
Replied to Laravel Validation Problem With Uploaded Image
$request->validate([
'companiesLogos' => 'required|file|size:512|mimes:png,jpg',
]);
change your validation and check.
Started a new Conversation Getting SetTrustProxies() Error After Aplication Upgraded To 8.x
Recently I have updated one of my old laravel project to 8.x. I deployed the new version of my application to the same heroku. now I'm getting an error Too few arguments to function Symfony\Component\HttpFoundation\Request::setTrustedProxies(), 1 passed in /app/app/Http/Middleware/HttpsProtocol.php on line 13 and exactly 2 expected'
in multiple places (login, clicking on activation link from ativation email). I didn't modified the TrustProxies Middleware. we didn't updated the heroku env.
Replied to Cannot Access Any Pages After Installation On Server
Both the autoload and bootstrap files are loaded correctly in the index file?
Replied to How To Pass Array As Second Parameter In Livewire Function
Thank you. It was some other errors. A js files was doing the count increment functionality.
Replied to How To Pass Array As Second Parameter In Livewire Function
I want to update the item count in the cart. I tried with $this->item['cart_count'] +=1
and it updates but the result is wrong. Means, if we have two items in the cart and we increment the count of one item then, count of two cart items are updating. Also when I remove the item from the cart, it is not reflecting immediately. it reflecting only after refreshing the page.
Replied to How To Pass Array As Second Parameter In Livewire Function
I tried json_encode()
and it worked. but not sure it is a better way or not.
Replied to How To Pass Array As Second Parameter In Livewire Function
returning this error. Unable to call component method. Public method [increment(2,{] not found on component: [cart]
Started a new Conversation How To Pass Array As Second Parameter In Livewire Function
Hi All,
I have a livewire component for my cart functionality. In that I have to pass an array as second parameter to increment
function. how can I achieve that?
Cart component
class Cart extends Component
{
public $cart;
public $item;
public function mount(array $item): void
{
$this->cart = CartFacade::get();
$this->item = $item;
}
public function render()
{
return view('livewire.cart');
}
public function increment(int $productId, array $item)
{
.....
}
}
cart blade
<tr class="cart_item">
....
<td class="product-quantity" data-title="Quantity">
<div class="detail-qty info-qty border radius6 text-center">
....
<span class="qty-val">{{ $item['cart_count'] }}</span>
<a href="#" class="qty-up" wire:click="increment({{ $item['product_id'] }},'{{ $item }}')"><i
class="fa fa-angle-up" aria-hidden="true"></i></a>
</div>
</td>
....
</tr>
This is my code. It returning an error htmlspecialchars()
because of the second parameter is an array.
Replied to How To Display A Picture That I Saved Into The Storage Folder ?
Are you storing the file path in DB? if yes, run php artisan storage:link
. then in your img
tag you can access the image path using asset()
function
Replied to How To Set Condition In Maatwebsite Laravel/Excel Upload
Check this doc https://docs.laravel-excel.com/3.1/exports/column-formatting.html. hope it will help you
Replied to Queue : Job Table Filled But Nothing Append
Stop the queue worker. Close and reopen the terminal and try running queue:work or queue:listen
Replied to Recaptcha Google V2 In Laravel
$body = json_decode($response->getBody(), true);
dd($body['success'])
this code is working fine for me