armancodes

armancodes

Member Since 2 Years Ago

Experience Points
103,740
Total
Experience

1,260 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
375
Lessons
Completed
Best Reply Awards
13
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 21
103,740 XP
Jul
07
6 days ago
Activity icon

Replied to Password Reset Email Doesn't Work

Can you share the code where you try to send the email?

Jun
01
1 month ago
Activity icon

Replied to The Problem With Displaying The Content Of A Form.

It'd be much better if you use blade files for this.

May
22
1 month ago
Activity icon

Replied to Searching Select List In Laravel 7

You can simply use this package for both listing and searching items. It also comes with some extra features like pagination, sorting, etc.

https://github.com/yajra/laravel-datatables

  • FYI: under the hood this package uses ajax requests to get results for a search query.
Activity icon

Replied to Where To Store My Videos?

You can probably use this package:

https://github.com/vimeo/laravel

Activity icon

Replied to Where To Store My Videos?

If I had to choose I would go for Vimeo as Laracasts and many others did. This platform will help you manage everything and you don't really have to think about an optimized and also extendable server to handle this.

May
12
2 months ago
Activity icon

Awarded Best Reply on Forge SSL Breaks Storage Link

run :

php artisan storage:link

And put this in your .env file:

FILESYSTEM_DRIVER=public
May
11
2 months ago
Activity icon

Replied to Forge SSL Breaks Storage Link

run :

php artisan storage:link

And put this in your .env file:

FILESYSTEM_DRIVER=public
May
04
2 months ago
Activity icon

Awarded Best Reply on Where Do I Find Free Templates?

Any HTML template would work fine with Laravel. It doesn't need to be specifically made for Laravel. Just search whatever template you want.

Activity icon

Replied to Getting Error When Trying To Deploy Github Changes

@mb You have to specify the file name:

git rm --cached .env
Activity icon

Replied to Laravel 7 File Not Found Exception On Download Zip File

Have you set the APP_URL in your .env file?

Activity icon

Replied to Getting Error When Trying To Deploy Github Changes

@mb First of all you have to connect your Github account in your Forge panel.

Then you can pull the changes to your server. It means you would no longer need to do it from the server manually.

Activity icon

Replied to Getting Error When Trying To Deploy Github Changes

Oh, I forgot you pushed it before from your local.

So run this command in the forge server:

git pull
Activity icon

Replied to Laravel 7 File Not Found Exception On Download Zip File

Have you created symlinks? if not run this command:

php artisan storage:link
Activity icon

Replied to Getting Error When Trying To Deploy Github Changes

If you want to send the new changes to the server run this command:

git push
Activity icon

Replied to Redirecting To Intended URL After Registration

As @luke.lightfoot@co-alliance.com just said

Put this in your RegisterController:

protected function registered(Request $request, $user)
    {
        return redirect()->intended($this->redirectPath());
    }
Activity icon

Awarded Best Reply on Syntax Error, Unexpected ';', Expecting ')' (View: ...\resources\views\events\create.blade.php)

You had one ) left here: Copy and paste it with your own code:

{{ date('Y-m-d\Th:m:s',  strtotime(old('start_date'))) }}
Activity icon

Replied to The Profile Picture Is No Longer Displayed

Will $user->avatar give you the avatar file name?

Activity icon

Replied to Laravel 7 And Navbar Bug

Have you installed laravel/ui package in your project?

Activity icon

Replied to Where Do I Find Free Templates?

Any HTML template would work fine with Laravel. It doesn't need to be specifically made for Laravel. Just search whatever template you want.

Activity icon

Replied to Syntax Error, Unexpected ';', Expecting ')' (View: ...\resources\views\events\create.blade.php)

You had one ) left here: Copy and paste it with your own code:

{{ date('Y-m-d\Th:m:s',  strtotime(old('start_date'))) }}
Activity icon

Awarded Best Reply on Get ID Array And Use In Second Query

Try this:

 $areaass = AreaAss::where('areaid', $AreaIds)
        ->pluck('associd');
Activity icon

Replied to Get ID Array And Use In Second Query

Try this:

 $areaass = AreaAss::where('areaid', $AreaIds)
        ->pluck('associd');
Activity icon

Awarded Best Reply on Get Characters After Second/ In Path

Try it out:

$fileName = array_reverse(explode('/', 'storage/venues/1587654236-817295330/1587654236-883425557.jpg'))[0];

The output will be:

// 1587654236-883425557.jpg
Activity icon

Replied to Get Characters After Second/ In Path

Try it out:

$fileName = array_reverse(explode('/', 'storage/venues/1587654236-817295330/1587654236-883425557.jpg'))[0];

The output will be:

// 1587654236-883425557.jpg
Activity icon

Replied to Post With Ajax And Bootstrap Modal

Give your route a name:

Route::post('/addstudent', 'projects\[email protected]')->name('ajax.store.student');

For the url of the ajax replace this:

$.ajax({
      type: "POST",
      url: "{{route('ajax.store.student')}}",
      data: $('#addform').serialize(),
      success: function (response) {
        console.log(response)
        $('#studentaddmodal').modal('hide')
        alert("data saved");
      },
      error: function(error) {
        console.log(error)
        alert("Data not saved");
      }
    });
Activity icon

Replied to Files Automatically Deletes

So it has nothing to do with Laravel.

May
03
2 months ago
Activity icon

Replied to Laravel Route - Search Form Takes To Default Path

Considering your domain is http://example.com/_demo/public

Set the APP_URL in the .env file:

APP_URL=http://example.com/_demo/public
Activity icon

Replied to CURL Error

Can you show us the part of the code that causes the error?

Activity icon

Replied to Files Automatically Deletes

Is there anywhere in your code deleting them?

Is this happening in a fresh Laravel installation?

Apr
30
2 months ago
Activity icon

Replied to My Local Project Is Not Working On VPS

@mahir41 It might be because of your web server configuration either Apache, Ngnix. A better way to deploy is by using git. You push your code to your private repo on online git hosting services like Github, Gitlab, Bitbucket, etc. And then you can clone it from your server.

You can see the configuration for Nginx here:

https://laravel.com/docs/7.x/deployment

Activity icon

Replied to If Either $value1 And $value2 Is Not Null

if ( $value1 != null || $value2 != null  )
Apr
29
2 months ago
Activity icon

Replied to Laravel With GoDaddy

As Tray2 just said you don't need any online hosting for development purposes. You can even user Softwares like Xampp, Laragon, etc.

Activity icon

Replied to Laravel Put Multipart/form-data Api

That's because of CSRF:

https://laravel.com/docs/7.x/csrf

If you're going to send a request to your site from external sources you have to put the specified URL which you want the requests to be sent to in $except array in the VerifyCsrfToken middleware.

Activity icon

Replied to New Laravel Installation High Memory Usage

@amireix When you deploy you project to production the memory usage will drastically decrease mostly because of the power of the CPU of the server and not installing the dev composer packages like debugbar as jlrdw just said.

Activity icon

Replied to Laravel $response->status() Returns 200 But Actual Code Is 404

Can you just use

abort(404)

and then check the status of the page?

Activity icon

Replied to Polymorphic Relationship For Product, Category, And Market

There are two different many to many relationships which you've handled with two pivot tables which is fine. I don't think you need a polymorphic relationship.

For more information about polymorphic tables check this link:

https://laravel.com/docs/7.x/eloquent-relationships#one-to-many-polymorphic-relations

Activity icon

Replied to Load CSV File

Before importing this you can have your own logic.

Look at the UsersImport class on this page:

https://docs.laravel-excel.com/3.1/imports/basics.html

Apr
28
2 months ago
Activity icon

Awarded Best Reply on Route OR URL

It depends. But if you want to achieve something clear and robust. go with route().

T are some cons about using each of them:

action():

  • If you change the name of the method in your controller. You have to change the action argument wherever you used it with that name.

route():

  • The same as action, but if you change the name of the route.

url():

  • If you change the URL of the route (which you often need to do)

In my opinion, the best option is the route() helper.

Activity icon

Replied to Get Relationship Through Intermediate Table

Try using this one:

public function group()
{
    return $this->hasOneThrough(
        'App\ClientGroup',
        'App\Client',
        'client_id',
        'group_id',
        'id',
        'id'
    );;
}
Activity icon

Replied to Laravel $response->status() Returns 200 But Actual Code Is 404

An easier way to accomplish this is to install Laravel debugbar in your project:

https://github.com/barryvdh/laravel-debugbar

Activity icon

Replied to Get Relationship Through Intermediate Table

@alexf Can you share your DB structure?

Activity icon

Replied to Route OR URL

It depends. But if you want to achieve something clear and robust. go with route().

T are some cons about using each of them:

action():

  • If you change the name of the method in your controller. You have to change the action argument wherever you used it with that name.

route():

  • The same as action, but if you change the name of the route.

url():

  • If you change the URL of the route (which you often need to do)

In my opinion, the best option is the route() helper.

Activity icon

Replied to Load CSV File

Excel::load() is removed and replaced by Excel::import($yourImport)

Check this link: https://docs.laravel-excel.com/3.1/imports/collection.html

Mar
07
4 months ago
Activity icon

Replied to I Need Help

@tochino Provide the problem and the code.

Activity icon

Replied to Is The Series "Let's Build A Forum" Still Viable With Laravel 6 Or 7?

Yes, of course. The whole concept is the same. There are some minor changes in Laravel 6/7 which doesn't affect that much.

Mar
06
4 months ago
Activity icon

Replied to In Google Search Please Click Here If You Are Not Redirected Within A Few Seconds.

There might be a middleware or something that doesn't let the Google robots crawl your website meaning when they want to access your website they get the "Please click here if you are not redirected within a few seconds." message.

Activity icon

Replied to Returning An Error In JSON Instead Of 500

@karolgil I didn't understand. Can you elaborate?

Activity icon

Replied to Returning An Error In JSON Instead Of 500

@karolgil You can create a folder called "errors" in tour "resources/views" directory of your Laravel application and you can simply create some blade files with the name of the error: For example, if you want a custom 500 error you have to create a file called "500.blade.php" in that directory (resources/views/errors). Then in that file, you can return whatever you would like to.