app/Console/Commands/Inspire.php
/**
     * Execute the console command.
     *
     * @return mixed
     */
Execute the console command.
@return mixed
Execute the console command . @return mixed
public function handle()
    {
        $saturdays = $this->test123();
        $collect = collect();
        foreach ($saturdays as $saturday)
        {
            $collect = $collect->merge([$saturday->toDateString()]);
        }
        dd($collect);
        $count = 4;
        $dates = collect();
        $saturday = Carbon::parse('first saturday of this month');
        while( $count )
        {
            $dates = $dates->merge([$saturday]);
            $saturday = $saturday->parse('first saturday of next month');
            $count--;
        }
        dd($dates);
    }
public function handle ( ) { $ saturdays = $ this -> test123 ( ) ; $ collect = collect ( ) ; foreach ( $ saturdays as $ saturday ) { $ collect = $ collect -> merge ( [ $ saturday -> toDateString ( ) ] ) ; } dd ( $ collect ) ; $ count = 4 ; $ dates = collect ( ) ; $ saturday = Carbon :: parse ( 'first saturday of this month' ) ; while ( $ count ) { $ dates = $ dates -> merge ( [ $ saturday ] ) ; $ saturday = $ saturday -> parse ( 'first saturday of next month' ) ; $ count -- ; } dd ( $ dates ) ; }
Execute the console command.
Execute the console command .
// $this->comment(PHP_EOL.Inspiring::quote().PHP_EOL);