Nakov

Nakov

at SOLID Solutions

Member Since 4 Years Ago

Skopje

Experience Points
416,290
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
1578
Lessons
Completed
Best Reply Awards
431
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.

Level 50
416,290 XP
Nov
12
6 hours ago
Activity icon

Replied to Update From Laravel 5.8 To 6.5.0

@leonid1212 you said you followed the upgrade guide.. The upgrade guide says that the laravel/framework dependency should be set to use ^6.0.

So this :

"laravel/framework": "6.5.0",

should be this instead:

"laravel/framework": "^6.0",

Then you should run composer update.

When you do that, does composer run without any error?

Activity icon

Awarded Best Reply on All Php Artisan Command Not Working

@manof360 here is the problem:

Auth::rotes();

should be

Auth::routes();

missing u.

Activity icon

Replied to All Php Artisan Command Not Working

@manof360 here is the problem:

Auth::rotes();

should be

Auth::routes();

missing u.

Activity icon

Replied to All Php Artisan Command Not Working

@manof360 so you use some where rotes instead of routes, or more likely it should be route.

Share the full web.php file code please.

Activity icon

Replied to Set Field To Null In Update Notworking

@carlosmora the $product_list contains an ID or an array of IDs?

Maybe whereIn should be used instead?

Product::whereIn('id', $product_list)->update(['family_id' => null]);
Nov
11
1 day ago
Activity icon

Awarded Best Reply on 'description' Of Non-object

Trying on a collection will throw that error of course.. get() returns a collection, first() returns an instance of a model..

so

$voucherTrans->first()->description

will not throw that error.

Activity icon

Awarded Best Reply on New Laravel Project Inside Vagrant - Permission Denied

@stuter12 when using vagrant you should just run laravel new your_project locally not on the vagrant image, and then make your Homestead.yaml file to map the local project to vagrant. Have you checked the docs:

https://laravel.com/docs/master/homestead

Activity icon

Replied to Connexion Database

@heimdall do you have the connection set up correctly? Your .env file uses the DB credentials that you need, right?

Then test in your update method if the $membre is already the correct one using dd($membre) as a first line, before you do any update, as the Route model binding should already do that if you have a correct route, for example:

Route::patch('membre/{membre}', '[email protected]');

Then in the method, at the end instead of update and passing an array of fields, which in your case should update just the id you can call this:

$membre->save();

It should save the changes.

Activity icon

Replied to Is It A Good Thing To Have Many Textarea ?

@browniecoffee why would it be? I don't see any reason why.. but I would make a normal limit to how many you can add :)

There are forms btw with so many elements, a textarea is no different.

Activity icon

Replied to New Laravel Project Inside Vagrant - Permission Denied

@stuter12 when using vagrant you should just run laravel new your_project locally not on the vagrant image, and then make your Homestead.yaml file to map the local project to vagrant. Have you checked the docs:

https://laravel.com/docs/master/homestead

Activity icon

Replied to In Config.php Line 494: Call To Undefined Method Illuminate\Validation\Rules\In::__set_state()

@hasen39 then try manually deleting the config.php file if there is one inside bootstrap/cache/ directory. And then run php artisan config:cache.

Run the composer dump-autoload as well, in case you did an update of any library.

And check this answer on SO:

https://stackoverflow.com/a/47910128/1457270

Activity icon

Replied to In Config.php Line 494: Call To Undefined Method Illuminate\Validation\Rules\In::__set_state()

@hasen39 can you share the code from your form request or wherever you do a validation? Or if you use this in the config.php I don't think you can use a Rules or any laravel class aside from the env() helper and PHP core functions.

Activity icon

Replied to Update From Laravel 5.8 To 6.5.0

@leonid1212 and did you followed my advise above fully, to first run:

php artisan config:cache    

And then:

php artisan config:clear    

The first will create the config.php file instead of manually doing so as you did above.

The next step that I would take is create a completely separate project using the latest version and transfer the files. Maybe some caching on your Docker image is involved, so check that too.

Activity icon

Replied to Update From Laravel 5.8 To 6.5.0

@leonid1212 do you have any changes to the .env file, for example:

APP_NAME=APP NAME

Instead of

APP_NAME="APP NAME"

make sure that you don't have any spaces in the values in your .env file.

Or run this commands in order:

composer dump-autoload
php artisan config:cache    
php artisan config:clear
Activity icon

Awarded Best Reply on Can We Use Model Inside A Jquery Function?

@matheenulla or try this instead:

$('#brand_name').on('change',function(){
    var optionSelected = $(this).find("option:selected");
    var brandId  = optionSelected.val();
    var brandName   = optionSelected.text();
});
Activity icon

Replied to Can We Use Model Inside A Jquery Function?

@matheenulla or try this instead:

$('#brand_name').on('change',function(){
    var optionSelected = $(this).find("option:selected");
    var brandId  = optionSelected.val();
    var brandName   = optionSelected.text();
});
Activity icon

Replied to Can We Use Model Inside A Jquery Function?

Then you can use this:

$('#brand_name').on('change',function(){
    var brand = $(this).val();
    var brandName = $(this).text();
});

Have you tried it?

Activity icon

Replied to Can We Use Model Inside A Jquery Function?

@matheenulla can you please show your <select> element here?

Activity icon

Replied to Can We Use Model Inside A Jquery Function?

@matheenulla no you cannot do that, brand is a JS variable, not a PHP, so it will throw an exception using it there..

So your select option doesn't it have <option value="1">NAME OF BRAND</option> for example? You can get the name from there, can't you?

Like:

var brandName = $(this).text();

for example?

Activity icon

Awarded Best Reply on Password & Confirm Password Error

@van1310 and how are you accessing the page where you have this registration form? Do you have a POST route to access that page as well?

Because when a request fails to be validated, then it returns back with the errors in the session. And MethodNotAllowedHttpException means that the GET request does not work for that route I guess.

Activity icon

Replied to Password & Confirm Password Error

@van1310 and how are you accessing the page where you have this registration form? Do you have a POST route to access that page as well?

Because when a request fails to be validated, then it returns back with the errors in the session. And MethodNotAllowedHttpException means that the GET request does not work for that route I guess.

Activity icon

Replied to Password & Confirm Password Error

@van1310 as I said, the exception is because you are redirecting to a route which does not have a Route::get('/'... so a GET method is not allowed for that route, just another one I guess.

Show your routes, your controller code as well if you are not using the default RegistrationController.

Can you show me the web.php file for the confirmpassword route? And the controller code?

Activity icon

Replied to Password & Confirm Password Error

@van1310 btw, your error says:

MethodNotAllowedHttpException

Which means you are not running a POST method or whatever.. Show your full form please.

Activity icon

Replied to Password & Confirm Password Error

You don't need this.. copy what I've shown above:

Remove this:

            'password_confirmation' => 'required'
Activity icon

Replied to Password & Confirm Password Error

@van1310 following the documentation

the rule is confirmed and the name attribute should be password_confirmation.

public function rules()
    {
        return [
            'password' => 'required|confirmed',
        ];
    }
<input type="password" name="password" placeholder="password">
<input type="password" name="password_confirmation" placeholder="confirm_password">
Activity icon

Replied to 'description' Of Non-object

@davy_yg being a programmer involves reading documentation. I know your answer will be you don't have time, but that's not an excuse.

I am out of helping you until you return and have read a bit of documentation for Laravel at least, let alone for the packages that you inherited by someone.

Activity icon

Replied to 'description' Of Non-object

Trying on a collection will throw that error of course.. get() returns a collection, first() returns an instance of a model..

so

$voucherTrans->first()->description

will not throw that error.

Activity icon

Replied to 'description' Of Non-object

@davy_yg see this in the view $model->translate($key)->$name.. $name is replaced by description in your case, that's where the errors comes from.

Activity icon

Replied to 'description' Of Non-object

@davy_yg in the Macro that you've shown there is this line:

$model = $this->model;

Now in the view

return view(
                'components.field.text-translatable',
                compact('locales', 'model', 'name', 'label', 'options')
            )->render();

the $model is passed.

So in text-translatable.blade.php file there is a usage like this one:

$model->{$name}

name here is a description in your case from the field name... but that does not exists on the instance, + the $model is not an instance of what you want but an array, hence the error above.

Activity icon

Replied to 'description' Of Non-object

@davy_yg yes it is global.. So it tries to get the description but the data passed is not an instance of the model but an array instead.

So what does your $voucher contains? An array?

You can debug it like this:

$voucher = $this->voucher_repo->getEdit($id);
dd($voucher);

And instead of pushing to an array if it is an instance of the Voucher model then just add it like this maybe?

$voucher = $this->voucher_repo->getEdit($id);
    
$voucher->description = "test";

return view('voucher.edit', compact('voucher'));
Activity icon

Replied to Vapor Vs Lightsail

Don't know if there is a comparison, but since Vapor is a product by the creator of Laravel, I would personally aim towards that as long as the app is Laravel, it will always be up to date. :)

Activity icon

Replied to Simple Javascript Toggle Bettwen Classes

Subscribe to laracasts you will learn lots of the cool tricks:

https://laracasts.com/series/how-do-i/episodes/25

Activity icon

Awarded Best Reply on Using WithCount('a')->having('a_count', '=', 0)->delete() Erase All The Table!

@romainb yeah, that's a really weird behavior, I reproduced it on my table as well.. This is what worked for me, and it is simplified.

Keyword::doesntHave('websites')->delete(); 

I think that problem has to do by running having() on the query, but I am not sure..

Let me know if this works for you :)

Activity icon

Replied to 'description' Of Non-object

@davy_yg

I think this is the package doc: https://packagist.org/packages/dimsav/laravel-translatable

Guessing won't help. You should check your composer.json file in order to find which package is used for those forms, and find the documentation through there.

Activity icon

Replied to 'description' Of Non-object

I guess it comes from the library that you are using.. so this

SemanticForm::textTranslateable('description', 'Description', ['required' => true])

Might be that the third parameter is not an array of options but a default text for the description, so try using this:

SemanticForm::textTranslateable('description', 'Description', null, ['required' => true])

Or check the documentation of the library.

Activity icon

Replied to Uncaught TypeError: Cannot Read Property 'checked' Of Null At GetBrand1 (Add:967) At HTMLInputElement.onclick (Add:852) Blue.css:1 Failed To Load Resource: The Server Responded With A Status Of 404 (Not Found)

@kanchan186 as you've opened a new thread with a question that you already asked here, maybe you should consider accepting an answer that helped you here to solve your initial question..

Activity icon

Replied to Uncaught TypeError: Cannot Read Property 'checked' Of Null At GetBrand1 (Add:967) At HTMLInputElement.onclick (Add:852) Blue.css:1 Failed To Load Resource: The Server Responded With A Status Of 404 (Not Found)

@kanchan186 do you use any library for the checkboxes? Make sure you disable any additional styling and see if they appear. Or use Inspect element on your browser to see if next to the text you can see a checkbox, anything else seems correct to me.

Nov
10
2 days ago
Activity icon

Replied to Using WithCount('a')->having('a_count', '=', 0)->delete() Erase All The Table!

@romainb yeah, that's a really weird behavior, I reproduced it on my table as well.. This is what worked for me, and it is simplified.

Keyword::doesntHave('websites')->delete(); 

I think that problem has to do by running having() on the query, but I am not sure..

Let me know if this works for you :)

Activity icon

Awarded Best Reply on Target Class [App\Http\Controllers\EventsController] Does Not Exist

@matildah EventsContoller is not the same with EventsController. Maybe a typo there?

Activity icon

Replied to Target Class [App\Http\Controllers\EventsController] Does Not Exist

@matildah EventsContoller is not the same with EventsController. Maybe a typo there?

Activity icon

Replied to Target Class [App\Http\Controllers\EventsController] Does Not Exist

Your controller is missing one important line above, below use App\Event;

class EventsController extends Controller {
Activity icon

Awarded Best Reply on Strtoupper @foreach $var

@dawgonking you should use the helper function when you render the view, not in the iterator:

@forelse($airline->hubs as $hub)

   {{ strtoupper($hub) }}
Activity icon

Replied to Strtoupper @foreach $var

@dawgonking then please accept the answer :)

Activity icon

Replied to Strtoupper @foreach $var

@dawgonking you should use the helper function when you render the view, not in the iterator:

@forelse($airline->hubs as $hub)

   {{ strtoupper($hub) }}
Activity icon

Replied to Click On Li With A Class

@swimmer sorry, really want to help.. but this is what I get: https://snipboard.io/8AItxo.jpg

this site seems like it loads everything using scripts, so nothing is available on the page before it fully loads. Make sure that you wait for that before you run any script.

Activity icon

Replied to Click On Li With A Class

@swimmer not this page.. the page with the <select> element so we can try to do the selection.

This is what I've got: https://snipboard.io/8JoAKb.jpg