Shaden

Shaden

Member Since 1 Month Ago

Experience Points 4,260
Experience Level 1

740 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 30
Lessons
Completed
Best Reply Awards 2
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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.

23 Jun
4 weeks ago

Shaden left a reply on Laravel Explode Not Working

better show the rest of the code in this class.

Shaden started a new conversation Horizon For Laravel 5.6,

I need to install laravel Horizon on Laravel 5.6.

when I install with composer : composer require laravel/horizon

I get the latest version requiring Laravel 5.7

how can I get the Horizon version compatible with 5.6 Thanks

Shaden left a reply on How To Acess The Data Without Using Foreach Loop In Blade File


$attributename[0]

Would get the first Item in the list;

Shaden left a reply on Implode(): Invalid Arguments Passed

$request is not an array, you need to convert the Request to an array,

$requestArray = $request->all()
 $computer = implode(",", $requestArray ['computer']);

Shaden left a reply on Retrieving Information From 3 Tables

You need to setup relation in each model

and use that relation to call each table->related ->item

https://laravel.com/docs/5.8/eloquent-relationships

21 Jun
1 month ago

Shaden left a reply on Exception Handling

Hi

I would create a new exception class, and call it with throw exception in response,

 class DestroyException extends Exception
{


   // select the appropriate response from list in SymfonyResponse or make your own
 public $httpStatusCode = SymfonyResponse::HTTP_BAD_REQUEST;

    public $message = 'model not found exec.';

}

So I would use something like this in controller



            
        throw new DestroyException ();
   

Shaden left a reply on Unlimited Subdomain App With CloudFlare, SSL, Load Balancer, Forge

Hi When using Full,means you have Certificate installed in your server with *.your domain,

If you use Flex would work.

Shaden left a reply on Unlimited Subdomain App With CloudFlare, SSL, Load Balancer, Forge

HI

All you do is add all your subdomains to cloudflare dns like you did with myapp.com, you only need to enter the subdomain, like 'XYZ ', and map them all to the same IP address of your server,

that should do it,

Shaden left a reply on Customize $message When Validation Failed On `unique`?

@CRONIX - Hi the Original Question is " I am building a JSON API", so your response applies to web response with html Tags, API needs json response.

the Best way to respond with errors in API is to throw an exception and add your exception with what ever message you want to return. BTW that's where you are getting the message ( The given data was invalid ) from, as the validation is using this exception from Laravel exceptions.

Shaden left a reply on Create Zip For Multiple Files By Chumper/zipper Package

@VINUBANGS - Hi Glad that your code is working now,

Shared Hosting mmmmmm,

if you can ssh to your files I guess you can use composer, if not, you can install manually, follow this

https://laracasts.com/discuss/channels/laravel/install-pacakge-in-laravel-app-on-cpanel

16 Jun
1 month ago

Shaden left a reply on Add Sub-domains To Forge Sites Deployed On AWS

You would map each subdomain to the same IP address of your AWS server.

or if you are using AWS hostname you use same CNAME for each subdomain.

hope that helps

Shaden left a reply on Customize $message When Validation Failed On `unique`?

Try This

 $validator = Validator::make($request->all(), [
           'unique:users'
        ]);

        if ($validator->fails()) {
            $message = ' User is not Unique    OR Any Message You want';
            return view('Your View')->withErrors($message);
        }

Shaden left a reply on Create Zip For Multiple Files By Chumper/zipper Package

@VINUBANGS - change to

' public function createzip($volume_id) { $articles = article::where('volume_id',$volume_id)->get();

foreach($articles as $article) {
            $files = public_path('storage/upload_pic/'.$article->image);

\Zipper::make(public_path('test.zip'))->add($files) } \Zipper ->close(); return response()->download(public_path('test.zip'));

}

'

15 Jun
1 month ago

Shaden left a reply on Can Host A Small Laravel Backend In Cpanel Which Having 500mb Storage??

I guess you can, provided that you have ssh access with putty, and not large database.

Shaden left a reply on Restricting API To Authorised Clients? (in Addition To User Auth)

You can try look at

https://github.com/apiato/apiato

they have double auth for API

with permissions on what each role can access, using Laravel permissions.

api:auth

Shaden left a reply on What Do You Think About Apiato?

Just for any late comers

Apiato is great, without doubt the best Platform to use with Laravel for API's and if you want web also.

I think the maker should be awarded fro this great work....

enjoy it.

Shaden left a reply on Create Zip For Multiple Files By Chumper/zipper Package

I think in your case you need

\Zipper::make(public_path('test.zip'))->add($files);

to be in side the foreach loop, and close the zipper after the close of the loop.

Shaden left a reply on Create Zip For Multiple Files By Chumper/zipper Package

Hi This is a snipped I use and works fine, maybe will help you ''' if (count($data['data']) > 30000) {

        $filepath = storage_path('Csvs/');
        $fileCalled = $data['file'] . '-report-';

        $filename = $filepath . $fileCalled;
        $zipfile = $fileCalled . '.zip';


        $chunks = $data['data']->chunk(30000);
        unset ($data['file']);


        $zipper = new \Chumper\Zipper\Zipper;

        $zipper->make($filepath . $zipfile);
        $id = 0;
        foreach ($chunks as $chunk) {
            $file = (new FastExcel($chunk))->export($filename . $id . '.xlsx');
            $zipper->add($file);
            $id++;
        }
        $zipper->close();
        return response()->download($filepath . $zipfile);



    }

'''