tisuchi

Sr. Software Engineer at CartX

Member Since 5 Years Ago

Dhaka, Bangladesh

Experience Points
703,725
Total
Experience

0 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
1731
Lessons
Completed
Best Reply Awards
636
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    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.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 50
703,725 XP
Aug
12
17 hours ago
Activity icon

Replied to Upload Pictures / Videos 💌

@konstruktionsplan I believe it will be applicable in the same way for laravel 7.

You can get more details for laravel 7x in the laravel documentation. Ref: https://laravel.com/docs/7.x/filesystem

Activity icon

Awarded Best Reply on Laravel Socialite With Facebook

@almesery I have noticed that some user has the same types of problem. Based on the suggestion, the finding is to follow the stateless() approach.

Socialite::driver('facebook')->stateless()->user();

Check more: https://laracasts.com/discuss/channels/laravel/socialite-invalidstateexception-in-abstractproviderphp

Activity icon

Replied to ErrorException (E_NOTICE) Undefined Offset: 1

@me10071990 You can try this code to avoid undefined offset.

$csv=explode(",",$body);

if(count($csv) >= 2){
	$ApiData=$csv[1];
}

foreach ($csv as $row)
{
   $ApiData=str_getcsv($row);
}
Aug
11
1 day ago
Activity icon

Replied to On Retrieve: Eloquent Model Return Null While Query Builder Working Fine

@apexleo Have you set the proper table name in your model?

AdviceMedia.php


protected $table = 'advice_media';

Now try again.

Because it seems your table name advice_media doesn't match the default table naming convention of laravel. Probably that's the reason.

Activity icon

Replied to Getting Relationship Data

@cservices well, actually it will return the collection since it hasMany() relationship.

// In your controller
$project = Project::with('notes')->find($projectid);

// In view

@foreach($project->notes as $note)
	{{ $note->projectid }}
@endforeach
Activity icon

Replied to Getting Relationship Data

@cservices Have you set the key of your relationship properly? Make sure of it.

Activity icon

Replied to Eager Loading Count Not Working

@nickywan123 Have you tried withCount()?

For example-

$reply->withCount('favorites');
Activity icon

Replied to Carbon Interval To Two Parts Only

@owiesnama hope it works fine now?

Activity icon

Awarded Best Reply on ErrorException (E_ERROR) Trying To Get Property 'value' Of Non-object

@maxxxabro I am not sure exactly for which line you are getting this error.

But I suggest you use optional() to every place as following-

@if(optional(\App\BusinessSetting::where('type', 'paypal_payment')->first())->value == 1)

instead of

@if(\App\BusinessSetting::where('type', 'paypal_payment')->first()->value == 1)

Note: It's not a good idea to write your logic inside the view file. You better avoid it.

Activity icon

Replied to Carbon Interval To Two Parts Only

@owiesnama Have you tried this?

assigned_at.diffAsCarbonInterval(created_at)->format('%d days %h hours');
Activity icon

Replied to ErrorException (E_ERROR) Trying To Get Property 'value' Of Non-object

@maxxxabro I am not sure exactly for which line you are getting this error.

But I suggest you use optional() to every place as following-

@if(optional(\App\BusinessSetting::where('type', 'paypal_payment')->first())->value == 1)

instead of

@if(\App\BusinessSetting::where('type', 'paypal_payment')->first()->value == 1)

Note: It's not a good idea to write your logic inside the view file. You better avoid it.

Aug
10
2 days ago
Activity icon

Replied to 419 Page Expired

@timtom Since you are getting post_token then can you try in incognito mode of your browser and try?

Activity icon

Replied to Test Is Passing With AssertSee() While Error In Browser

@key what if you try checking assertStatus() code first before checking assertsee()?

And in your action, you try this way-

$videos = Video::paginate()->get();

instead of -

$videos = Video::paginate()->get(10);
Activity icon

Awarded Best Reply on Confusion On Strucutre.

@karlhill69 The things you are seeing in the script it's called localization.

It means, in your resources/lang/en folder, there is a file called reminder where you can find an array key called title.

Once you print {{ __('reminder.title') }} in your view template, it will print the value of title key basically.

Read more: https://laravel.com/docs/7.x/localization

Activity icon

Replied to Confusion On Strucutre.

@karlhill69 The things you are seeing in the script it's called localization.

It means, in your resources/lang/en folder, there is a file called reminder where you can find an array key called title.

Once you print {{ __('reminder.title') }} in your view template, it will print the value of title key basically.

Read more: https://laravel.com/docs/7.x/localization

Aug
09
3 days ago
Activity icon

Awarded Best Reply on Inverse Relationship

@jvbalcita if I understand you properly, you want to access student data from the teacher model.

In that case, you just simply use dot notation for Nested Eager Loading to access.

For example-

Teacher::with('courses.students')->get()

Ref: https://laravel.com/docs/7.x/eloquent-relationships#eager-loading

Activity icon

Replied to Laravel Socialite With Facebook

@almesery I have noticed that some user has the same types of problem. Based on the suggestion, the finding is to follow the stateless() approach.

Socialite::driver('facebook')->stateless()->user();

Check more: https://laracasts.com/discuss/channels/laravel/socialite-invalidstateexception-in-abstractproviderphp

Activity icon

Replied to Custom User Model

@rshepard21 I am not sure what exactly you mean. But I believe you can get some idea from this link.

https://medium.com/@ZtuX/how-to-change-your-authentication-model-in-laravel-5-3-7a580a727d6f

Activity icon

Replied to Laravel Socialite GitHub Redirect Page 404 Page Not Found

@towhid

Honestly, I can't see any issue. It might be somehow the issue of the cache. Can you run the following command and try again?

php artisan optimize:clear
php artisan cache:clear
php artisan config:clear
php artisan config:cache
Activity icon

Awarded Best Reply on How Can I Convert `data[1]` To Integer Format In JQuery-Ajax?

@imrulhasan273 What if you try parseInt() this?

$sum = parseInt($count[0]) + parseInt(data[1]);
Activity icon

Replied to How Can I Convert `data[1]` To Integer Format In JQuery-Ajax?

@imrulhasan273 What if you try parseInt() this?

$sum = parseInt($count[0]) + parseInt(data[1]);
Activity icon

Replied to Inverse Relationship

@jvbalcita if I understand you properly, you want to access student data from the teacher model.

In that case, you just simply use dot notation for Nested Eager Loading to access.

For example-

Teacher::with('courses.students')->get()

Ref: https://laravel.com/docs/7.x/eloquent-relationships#eager-loading

Activity icon

Awarded Best Reply on Check Whether The Json Value Is Empty Or Not

@ivanleoncz69

What if you try isset() to check?

$configuration = json_decode(shop()->setting->whatsapp_configuration, true);


if (! isset($configuration['send_message_via'])){
    return false;
}

return $configuration['send_message_via'];
Activity icon

Replied to Check Whether The Json Value Is Empty Or Not

@ivanleoncz69

What if you try isset() to check?

$configuration = json_decode(shop()->setting->whatsapp_configuration, true);


if (! isset($configuration['send_message_via'])){
    return false;
}

return $configuration['send_message_via'];
Activity icon

Replied to Laravel Socialite GitHub Redirect Page 404 Page Not Found

@towhid It seems your configuration is ok.

Can you clear the cache, boot up the server and try one more time?

Activity icon

Replied to How Can I Return A Value With Redirect Back

@hilbert

Try this way?

return redirect()
	->back()
	->with(['calculations'=>$calculations]);
Activity icon

Replied to How Can I Generate Access Error And Error Message, Leaving User On The Page?

@petrogromovo

First of all, why don't you use Auth::check() here?

 $loggedUser = Auth::user();
 
 if ( Auth::check()) {
     return response()->json([
     'error_code'=> 1, 
     'message'=> "You must be logged!"
    ], HTTP_RESPONSE_INTERNAL_SERVER_ERROR);
 }

Now you can easily use Gate here for authorization. https://laravel.com/docs/7.x/authorization#gates

Activity icon

Replied to Laravel And Redis Security Questions

@boubou as of my understanding, for locally you don't have to set up password for redis. But you can set your password for redis. After setup your redis, you need to adjust the redis configuration in .env file.

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
Activity icon

Replied to Videos On Feature Testing In Laravel

@ortho Sounds interesting.

Aug
08
4 days ago
Activity icon

Replied to Undefined Index: User

@webfuelcode have you checked that what data exactly returned by $notification->data? Your uploaded image is not clear enough to read.

Activity icon

Awarded Best Reply on What Is The Best PHP Web Scrapper ?

@ebrahemsamer

Have you checked this list? Probably you will find the right one-

https://dzone.com/articles/8-awesome-php-web-scraping-libraries-and-tools

Activity icon

Replied to Undefined Index: User

@webfuelcode show your notifications.blade.php file.

Activity icon

Replied to What Is The Best PHP Web Scrapper ?

@ebrahemsamer Personally I used Goutte and I was happy with that because it serves my purposes.

You may can give a try it.

Activity icon

Replied to Relationship In DB Does Not Exist

@kbuczynski

Where is your crmCompanyAddresses relationship method? Did you define it?

Activity icon

Replied to How To Use DiffForHumans In Notification?

@webfuelcode

Have you tried this way?

Carbon\Carbon::parse($notifications->data['user']['created_at'])->diffForHumans()
Jul
25
2 weeks ago
Activity icon

Awarded Best Reply on Validation For Quantity And Price

@salmazz45

What if you try regular expression? I personally prefer that. For example-

'price' => 'nullable|regex:/^\d*(\.\d{2})?$/'

Check more: http://www.blogperk.com/en/validate-a-float-value-in-php-laravel-framework

Activity icon

Replied to Password Reset Email

@paacnok Honestly Gmail is not the ideal solution for triggering emails. You better use some other application that provides you with a free account.

Maybe you can try with-

And a lot more.

Btw, if you still interested for using Gmail, you may check in the log why exactly you are getting 500 error.

Jul
24
2 weeks ago
Activity icon

Replied to Validation For Quantity And Price

@salmazz45

What if you try regular expression? I personally prefer that. For example-

'price' => 'nullable|regex:/^\d*(\.\d{2})?$/'

Check more: http://www.blogperk.com/en/validate-a-float-value-in-php-laravel-framework

Jul
18
3 weeks ago
Activity icon

Replied to No Replies Yet

@jeffreyway same issue here, no question in No Replies Yet. For discussion, it shows 6 threads per page.

https://funkyimg.com/view/36kRp https://funkyimg.com/view/36kRr

Jul
17
3 weeks ago
Jul
15
4 weeks ago
Activity icon

Replied to Server Questions For A Small Business

@karbotilne5

I would suggest you use cloudways since you are not used to managing the server. It will give you a user interface for managing your server easily.

Jul
14
4 weeks ago
Activity icon

Replied to Nested Relationships

@mohammednehru what is your issue actually? I cannot understand your question what exactly you want to achieve?