V9द

V9द

Member Since 1 Year Ago

Experience Points 7,840
Experience Level 2

2,160 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 29
Lessons
Completed
Best Reply Awards 6
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

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

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

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

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

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

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

04 Aug
7 months ago

V9द left a reply on How To Get Img Src From Blade To Controller

You can do this by using ajax. To get the img src value you can use :

var imgsrc=$('#main-img').attr('src');
24 Jul
7 months ago

V9द left a reply on Share Items On Social Media

anyone have possible answer please post

23 Jul
7 months ago

V9द left a reply on Share Items On Social Media

Please Help If anyone use before

V9द left a reply on Share Items On Social Media

any one have any idea?

21 Jul
7 months ago

V9द started a new conversation Share Items On Social Media

I want use social share plugin on my website. By using this user can share items on their website. I know that can be possible by Add this and other plugin. But I want instant response of sharing data to store in my database, By this I can find out which register user is sharing the item. Is it Possible ? Please tell me if you know any way Thank You

V9द left a reply on Undefined Variable: P_accounts Occurs

Try This One

public function open_personal_account()
    {
        $p_accounts = Personal_account::orderBy('created_at','desc')->paginate(5);

        return view('Overall.personal_accounts',compact('p_accounts'));

    }
28 Jun
8 months ago

V9द started a new conversation Create And-OR - And Query With Elequent

How we can create sql query in laravel using Elequent

select * from `products` where `status` = ? and `collection` = ? and (`product_category`= ? OR product_category=?) and  (`designer`=? OR `designer`=?) order by `id` desc limit 15 offset 0
14 Jun
9 months ago

V9द left a reply on Select Old Drop Down Value For Update Form

 @if(old('gender', $lead->gender) == 'Male') selected @endif
22 May
9 months ago

V9द left a reply on Allow Only The User To See His Edit And Delete ??

In User Model Define Relationship as given below

public function posts(){
      return $this->hasMany('App\Post');
    }

And You can get users post by using relationship on user model

$user->posts
21 May
9 months ago

V9द left a reply on Keep User Data After User Is Deleted

You Can soft delete the model soft Delete

V9द left a reply on Method Not Allowed

Use This, You not mention method on route

Route::resource('admin/frames', 'Admin\[email protected]');
19 May
9 months ago

V9द started a new conversation Send Digital Signed Email

I want to know how to send digital signed email in laravel, Is there any way to add digital signature in mail ? Please Help.

16 May
10 months ago

V9द left a reply on Href For A Route In JavaScript

location.href = '{{ route('/recebimento/dashboard') }}';
11 May
10 months ago

V9द left a reply on Scheduleing Is Not Working

@Snapey I agree with you, But my issue is when I run command using php artisan its working fine but with cron job its not working

$schedule->command('booking:sendmail')->everyFiveMinutes();    
$schedule->command('queue:work --sleep=3')->dailyAt('13:00');
$schedule->command('booking:removefakebooking')->dailyAt('23:59')

V9द left a reply on Scheduleing Is Not Working

@Snapey I agree with you, But my issue is when I run command using php artisan its working fine but with cron job its not working

$schedule->command('booking:sendmail')->everyFiveMinutes();    
$schedule->command('queue:work --sleep=3')->dailyAt('13:00');
$schedule->command('booking:removefakebooking')->dailyAt('23:59')

V9द left a reply on Scheduleing Is Not Working

@Snapey I agree with you, But my issue is when I run command in using php artisan its working fine but with cron job its not working

$schedule->command('booking:sendmail')->everyFiveMinutes();    
$schedule->command('queue:work --sleep=3')->dailyAt('13:00');
$schedule->command('booking:removefakebooking')->dailyAt('23:59')

V9द left a reply on Scheduleing Is Not Working

@bobbybouwmann I tired with php instead of php cli than its giving error

local.ERROR: Invalid argument supplied for foreach() {"exception":"[object] (ErrorException(code: 0): Invalid argument supplied for foreach() at /home/xxxx/xxxx/vendor/symfony/console/Input/ArgvInput.php:264
10 May
10 months ago

V9द started a new conversation Scheduleing Is Not Working

I am using Following List of command

$schedule->command('booking:sendmail')->everyFiveMinutes();    
$schedule->command('queue:work --sleep=3')->dailyAt('13:00');
$schedule->command('booking:removefakebooking')->dailyAt('23:59');

When I use directly in console its working fine but by cron it not working. My Cron Command is given below

*/5 *   *   *   *   php-cli -q /home/xxxx/xxxxx/artisan schedule:run >> /dev/null 2>&1

This is not showing any error also. Please tell me if there is any issue

19 Apr
10 months ago

V9द left a reply on Routes Issue

Try using like this

Route::get('/users-by-country/{country-slug-users}', '[email protected]');

When you call route you can add this <a href="{{route('/users-by-country/'.$countryslug.'-user')" and in Controller you can explode slug

14 Apr
11 months ago

V9द left a reply on Use Query In Eloquent

Thank you all of you for your help, today I learn something knew

V9द left a reply on Use Query In Eloquent

@Cronix Yes code is working very well, But I just want to know much better approach to deal with this kind of situtation.

V9द left a reply on Use Query In Eloquent

@Snapey Thanks for your reply Can you please explain this

You could write scopes to clean up the code now.

V9द started a new conversation Use Query In Eloquent

There are some product , In which them I am filtering products as given below

$query=DB::table('products');
        if(!empty($request->query('product'))){
            $query=$query->where('name','like','%'.$request->query('product').'%');   
        }
        if(!empty($request->query('price_from'))){
            $query=$query->where('sale_price','>=',$request->query('price_from'));   
            $query=$query->where('sale_price','<=',$request->query('price_to'));               
        }
        if(!empty($request->query('stock_from'))){
            $query=$query->where('stock_qty','>=',$request->query('stock_from'));
            $query=$query->where('stock_qty','<=',$request->query('stock_to'));            
        }
        if(!empty($request->query('stock_status'))){
            $query=$query->where('stock_status',$request->query('stock_status'));
        }
        if(!empty($request->query('product_status'))){
            $query=$query->where('status',$request->query('product_status'));
        }
        $query=$query->orderBy('id')->paginate($perpage);
        return view('search-products',compact(query));

But instead of above I want to use Eloquent, But I don't know How this will be ?? Please help

13 Apr
11 months ago

V9द started a new conversation Create Filter Query According To Parameter Using Eloquent

I want to filter products currently I am using below method its working fine. But whenever I want to apply pagination its not work. I tried with LengthAwarePaginator also but there is lot of stuff for me. So Please help and provide better approch if avialable, I am using laravel 5.6

 $perpage = "1";
        $offset = ($page - 1) * $perpage;
        $query='SELECT * FROM `products` WHERE 1=1';
        if(!empty($request->query('product'))){
            $query.=' && `name` like "%'.$request->query('product').'%"';   
        }
        if(!empty($request->query('price_from'))){
            $query.=' && `sale_price`>='.$request->query('price_from').' && `sale_price`<='.$request->query('price_to');    
        }
        if(!empty($request->query('stock_from'))){
            $query.=' && `stock_qty`>='.$request->query('stock_from').' && `stock_qty`<='.$request->query('stock_to');  
        }
        if(!empty($request->query('stock_status'))){
            $query.=' && `stock_status` ='.$request->query('stock_status'); 
        }
        if(!empty($request->query('product_status'))){
            $query.=' && `status` ='.$request->query('product_status'); 
        }
        
        $query.=' ORDER BY `id` DESC LIMIT '.$offset.','.$perpage;
12 Apr
11 months ago

V9द left a reply on How Can I Get Query Variable Value

You Can pass the variable value from controller to view like this

return view('posts',compact('id'))

05 Apr
11 months ago

V9द left a reply on Issue Submitting Form

@Danieloplata Its been good practice using named routes You Can More Details Here

V9द left a reply on Issue Submitting Form

Add this in form

{{ csrf_field }}

V9द left a reply on Issue Submitting Form

Put in the action this

{{ URL::to('/panel')  }}

V9द left a reply on Redirect Back Not Working

try this

return back();
03 Apr
11 months ago

V9द left a reply on Getting Error When Running Cron Job To Schedule Tasks

@bobbybouwmann How much memory it needed on server ??

V9द left a reply on Getting Error When Running Cron Job To Schedule Tasks

Yes enough memory available

V9द left a reply on Getting Error When Running Cron Job To Schedule Tasks

@bobbybouwmann I'm Soory I posted Worng Error I have Edited question Please Have look On this...

V9द left a reply on Getting Error When Running Cron Job To Schedule Tasks

@bobbybouwmann Thanx for reply this what I'm doing in console/kernel.php

protected $commands = [
        //
    ];

  
    protected function schedule(Schedule $schedule)
    {
        $schedule->command('queue:work')->hourly();
    }

   
    protected function commands()
    {
        $this->load(__DIR__.'/Commands');

        require base_path('routes/console.php');
    }```

V9द started a new conversation Getting Error When Running Cron Job To Schedule Tasks

I'm Using below command to run cron job to schedule artisan command

0,30 * * * * php-cli -q /home/to/project/artisan schedule:run >> /dev/null 2>&1 I'm Getting following error When ever the cron job is run local.ERROR: Invalid argument supplied for foreach() {"exception":"[object] (ErrorException(code: 0): Invalid argument supplied for foreach() at /home/to/project/vendor/symfony/console/Input/ArgvInput.php:264) [stacktrace] #0 /home/to/project/vendor/symfony/console/Input/ArgvInput.php(264): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, 'Invalid argumen...', '/home/to/pr...', 264, Array) #1 /home/to/project/vendor/symfony/console/Application.php(1007): Symfony\\Component\\Console\\Input\\ArgvInput->getFirstArgument() #2 /home/to/project/vendor/laravel/framework/src/Illuminate/Console/Application.php(79): Symfony\\Component\\Console\\Application->getCommandName(Object(Symfony\\Component\\Console\\Input\\ArgvInput)) #3 /home/to/project/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(121): Illuminate\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) #4 /home/to/project/artisan(36): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) #5 {main} "} I'm not getting what kind of this error

V9द left a reply on HTML And PHP Tags Saved In DB, How To Show It On Blade?

@serverus14 I think this in not best approch. I suggest you first have look on the laravel documents and tutorials and than try it.

V9द left a reply on HTML And PHP Tags Saved In DB, How To Show It On Blade?

Why you are storing php tags in database

V9द left a reply on HTML And PHP Tags Saved In DB, How To Show It On Blade?

You Can use Like this /{!!$plan->description!!}/

V9द left a reply on Error In Artisan Command Scheduleing When Setting Cron Job

@Nash Thank you for your help I tried out the links you provided. When I am Using Cron job command * * * * * php-cli -q /home/path/to/artisan schedule:run >> /dev/null 2>&1 Its Working For me But now I am seeing new error in log file [2018-04-03 09:32:01] local.ERROR: Uncaught ErrorException: proc_open(): fork failed - Resource temporarily unavailable in /home/to/segurahome/vendor/symfony/console/Terminal.php:127 Stack trace: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'proc_open(): fo...', '/home/segura/se...', 127, Array) #1 /home/to/project/vendor/symfony/console/Terminal.php(127): proc_open('stty -a | grep ...', Array, NULL, NULL, NULL, Array) #2 /home/to/project/vendor/symfony/console/Terminal.php(70): Symfony\Component\Console\Terminal::getSttyColumns() #3 /home/to/project/vendor/symfony/console/Terminal.php(32): Symfony\Component\Console\Terminal::initDimensions() #4 /home/to/project/vendor/symfony/console/Application.php(748): Symfony\Component\Console\Terminal->getWidth() #5 /home/to/project/vendor/symfony/console/Application.php(729): Symfony\Component\Console\Application->doRenderException(Object(ErrorException), Object(Symfony\Component\Console\Output\ConsoleOutput)) #6 /home/se {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 1): Uncaught ErrorException: proc_open(): fork failed - Resource temporarily unavailable in /home/to/project/vendor/symfony/console/Terminal.php:127 Stack trace: #0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, 'proc_open(): fo...', '/home/to/pr...', 127, Array) #1 /home/to/project/vendor/symfony/console/Terminal.php(127): proc_open('stty -a | grep ...', Array, NULL, NULL, NULL, Array) #2 /home/to/project/vendor/symfony/console/Terminal.php(70): Symfony\\Component\\Console\\Terminal::getSttyColumns() #3 /home/to/project/vendor/symfony/console/Terminal.php(32): Symfony\\Component\\Console\\Terminal::initDimensions() #4 /home/to/project/vendor/symfony/console/Application.php(748): Symfony\\Component\\Console\\Terminal->getWidth() #5 /home/to/project/vendor/symfony/console/Application.php(729): Symfony\\Component\\Console\\Application->doRenderException(Object(ErrorException), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) #6 /home/se at /home/to/project/vendor/symfony/console/Terminal.php:127) [stacktrace] #0 {main} "} I am understanding this error please help

02 Apr
11 months ago

V9द left a reply on Error In Artisan Command Scheduleing When Setting Cron Job

Please Help if you have any soloution I am unable to figur out this error.

V9द left a reply on Error In Artisan Command Scheduleing When Setting Cron Job

Please Help if you have any soloution I am unable to figur out this error.

V9द left a reply on Error In Artisan Command Scheduleing When Setting Cron Job

@Nash No I'm not using any foreach loop

V9द left a reply on Error In Artisan Command Scheduleing When Setting Cron Job

@RamjithAp When I run queue:work Command from console its working fine.