Our Black Friday sale is now live! All individual subscriptions are 50% OFF. This week only!

santino

santino

am independent at home

Member Since 1 Year Ago

Chia

Experience Points
25,130
Total
Experience

4,870 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
197
Lessons
Completed
Best Reply Awards
0
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 6
25,130 XP
Nov
17
1 week ago
Activity icon

Replied to Vue Vs Livewire

My personal opinion using Laravel - I like to use livewire with Laravel projects Because the code is almost the same used on Laravel, when I use it I really like that it blends very well with the code, even with the tags done by Taylor like @if(...) that works very well, another thing is that making a test for me is faster than vue because I don't need to compile it so I can see the changes faster on the browser... Another thing I really like is that I don't need to include the tag

	<div id="app">	</div>

just throw the component into Laravel and that's it.

Nov
06
2 weeks ago
Activity icon

Replied to Need Some Feed Back On How This Works?...

thanks, Sr. @marianomoreyra really appreciate your answer, I need to study this subject more, thanks for the links on the description, getting started on the traits and event system.

Regards Santino

Nov
05
2 weeks ago
Activity icon

Started a new Conversation Need Some Feed Back On How This Works?...

Hi, I am using spatie slugable on laravel model , It works like a charm... but I really dont understand how it works can some one explain to me how this calls the options , functions , variables ... when I enter to the definition I found the class slugOptions...

Can explain to me how this works??

whats means this = getSlugOptions() : SlugOptions I mean this sign : : : : the doble dots how this works

    public function getSlugOptions() : SlugOptions
    {
        return SlugOptions::create()
        ->generateSlugsFrom([ 'name' , 'sponsor_id' ])
        ->saveSlugsTo('slug');
    }

thanks a lot this is the class of reference

<?php

namespace Spatie\Sluggable;

class SlugOptions
{
    /** @var array|callable */
    public $generateSlugFrom;

    public string $slugField;

    public bool $generateUniqueSlugs = true;

    public int $maximumLength = 250;

    public bool $generateSlugsOnCreate = true;

    public bool $generateSlugsOnUpdate = true;

    public string $slugSeparator = '-';

    public string $slugLanguage = 'en';

    public array $translatableLocales = [];

    public static function create(): self
    {
        return new static();
    }

    public static function createWithLocales(array $locales): self
    {
        $slugOptions = static::create();

        $slugOptions->translatableLocales = $locales;

        return $slugOptions;
    }

    /**
     * @param string|array|callable $fieldName
     *
     * @return \Spatie\Sluggable\SlugOptions
     */
    public function generateSlugsFrom($fieldName): self
    {
        if (is_string($fieldName)) {
            $fieldName = [$fieldName];
        }

        $this->generateSlugFrom = $fieldName;

        return $this;
    }

    public function saveSlugsTo(string $fieldName): self
    {
        $this->slugField = $fieldName;

        return $this;
    }

    public function allowDuplicateSlugs(): self
    {
        $this->generateUniqueSlugs = false;

        return $this;
    }

    public function slugsShouldBeNoLongerThan(int $maximumLength): self
    {
        $this->maximumLength = $maximumLength;

        return $this;
    }

    public function doNotGenerateSlugsOnCreate(): self
    {
        $this->generateSlugsOnCreate = false;

        return $this;
    }

    public function doNotGenerateSlugsOnUpdate(): self
    {
        $this->generateSlugsOnUpdate = false;

        return $this;
    }

    public function usingSeparator(string $separator): self
    {
        $this->slugSeparator = $separator;

        return $this;
    }

    public function usingLanguage(string $language): self
    {
        $this->slugLanguage = $language;

        return $this;
    }
}

Oct
29
3 weeks ago
Activity icon

Started a new Conversation Best Book/videos Trainning Focus On Laravel Good Pratices And Php

Hi, I am learning laravel and I think that there is a history in order to get into it... so I want to read good books to put me in the best way and get me to focus on been a very good programmer and developer using PHP and Laravel on top...

Can you recommend to me your best book? thanks in advance santino

Oct
28
3 weeks ago
Activity icon

Replied to Create A HasOne Relations HELP

thanks @michaloravec but how to create the new account with thiss default?

    public function account()
    {
        return $this->hasOne('App\Account')->withDefault();
    }

i not ceating a new one related to the user

I GOT TO DO THIS AND I DONT LIKE IT

			if (!user()->account) {
				user()->account()->create();
			}
Activity icon

Started a new Conversation Create A HasOne Relations HELP

Hi, AM trying to call the user account, but some times get NULL because the user dont have an account created,

user()->account

HOW to call this and if the user dont have an account THEN create one and then call for it...?

thanks in advance

Activity icon

Replied to Help Making A Helper

@rodrigo.pedra , hi rodrigo I jus want to thanks you, and want to let you know how I modify yourr sended code to the final version I need, helps me a lot seeing your code look

Account::getAccount('owners')->transferTo(Account::getAccount('clients'), $product->value );
	public static function getAccount($name)
	{
		return self::query()->firstWhere('name', $name);
	}

	public function transferTo(Account $destinyAccount, $value)
	{
		$this->transactions()->create([
			'debit' => $value,
			'credit' => 0,
		]);
		$destinyAccount->transactions()->create([
			'credit' => $value,
			'debit' => 0,
		]);
	}

I dont have a balance collumn right now, but I will added with the code just gave to me , have an exellent day regards Sant

Activity icon

Replied to Help Making A Helper

thanks, @rodrigo.pedra - It seems that you know a lot about this... really appreciate it, I will read the comment and try to understand each line of code.

Regards Santino

Activity icon

Replied to Help Making A Helper

thanks, it makes the magic @rodrigo.pedra I want to ask, is there a better way to get into this approach, I mean like something more elegant? ... not your code, I mean like make this with service providers or facades or all that stuff, or this is the right and proper way to do this?

Am very new using laravel and I really don't have all the tools on my head

thanks in advance

Activity icon

Started a new Conversation Help Making A Helper

Hi, please am trying to make this helper, but I dont understand how to do It.. look I will explain

this is what I want to write on the controller

transaction( 85 , 'cash' , 'bank' );

on the helper or inside the account model this is what I want to achive:

	public function getRouteKeyName()
	{
		return 'name';
	}


	public function transaction( $value , Account $debitAccount , Account $creditAccount )
	{
		dd( $debitAccount ); // this should show me the reflected model witth NAME as slug
	}

EXTRA; I GOT THIS ERROR Non-static method App\Account::transaction() should not be called statically

Oct
22
1 month ago
Activity icon

Replied to How To Add A Record To The Collection?

@jlrdw look this is working inside the foreach

	@foreach ($ranks as $rank)
{{ $rank[ 'title' ] }}
@endforeach

But I really want to call all the records on this way

	@foreach ($ranks as $rank)
{{ $rank->title}}
@endforeach

this is the call on the controller

		$ranks = collect([
			collect(user()->rankClient)->put( 'title' , 'Client' ),
			collect(user()->rankProvider)->put( 'title' , 'Provider' ),
			collect(user()->rankDistributor)->put( 'title' , 'Distributor' ),
		]);

and this is the output

[
{
"id": 2,
"level": 2,
"upgrade_level": 250,
"service_percentage": 0.72,
"created_at": "2020-10-22T04:09:56.000000Z",
"updated_at": "2020-10-22T04:09:56.000000Z",
"laravel_through_key": 1,
"title": "Client"
},
{
"id": 1,
"level": 1,
"upgrade_level": 150,
"service_percentage": 0.7,
"created_at": "2020-10-22T04:09:56.000000Z",
"updated_at": "2020-10-22T04:09:56.000000Z",
"laravel_through_key": 1,
"title": "Provider"
},
{
"id": 3,
"level": 3,
"upgrade_level": 550,
"service_percentage": 0.74,
"created_at": "2020-10-22T04:09:56.000000Z",
"updated_at": "2020-10-22T04:09:56.000000Z",
"laravel_through_key": 1,
"title": "Distributor"
}
]

tthanks a lot am new here

Activity icon

Replied to How To Add A Record To The Collection?

@jlrdw got an error on foreach

Property [rank] does not exist in this collection instance. got any idea why... all is working on the return call on the controller on the foreach goes on error

Activity icon

Replied to How To Add A Record To The Collection?

Thant makes the magic !! thanks @jlrdw

		$ranks = collect([
			collect(user()->rankClient)->put( 'rank' , 'client' ),
			collect(user()->rankProvider)->put( 'rank' , 'provider' ),
			collect(user()->rankDistributor)->put( 'rank' , 'distributor' ),
		]);
Activity icon

Started a new Conversation How To Add A Record To The Collection?

Hi, I am trying to add a record to the collection but can't find a way to make the magic, please some help here

		$ranks = collect([
			user()->rankClient->put('rank', 'client'),
			user()->rankProvider,
			user()->rankDistributor,
		]);

this brings me the ranks of the user, but no label I need to add it with PUT BUT I CAN'T MAKE IT WORK because That is a relation there the calling nott a collect but... how to?

thanks in advance

Oct
08
1 month ago
Activity icon

Replied to How To Get Info From A Record THAT IS AN ARRAY And Contains Objects

You are a GENIUS!!!!!!!!!!!!!!!!! @michaloravec THANKS

THAT MAKES THE MAGIC!!! OMG

Activity icon

Started a new Conversation How To Get Info From A Record THAT IS AN ARRAY And Contains Objects

hi, I just save on one field this information, its a text string

[{"id":2,"value":25,"tittle":"Calamares de mar"},{"id":3,"value":95,"tittle":"Cereal de almendras"}]

so that's an array with 2 objects inside, now I am trying to get the info outside in a blade view, but I can't understand how can it be done... so far I got this with errors

@foreach (  $order->description as $info)
{{ $info }}
@endforeach

NOTICE THAT the string is inside this $order that's the way I can call the field that contains the array

Invalid argument supplied for foreach() (View: C:\Users\danie\Apps\LMAcademy\resources\views\account\partials\ordersPartial.blade.php)

Activity icon

Replied to Laravel Get 4 Records From Each Object Of Collection

You are right I should place another threat on this, thanks to you very much for all your help @michaloravec

Activity icon

Replied to Laravel Get 4 Records From Each Object Of Collection

@michaloravec no Michal ,I cant get the information, I tryed both look my code please

@foreach ( $order->description as $info)
						{{ $info }}
@endforeach

that give an error, Invalid argument supplied for foreach() (View:

I think is that I am calling a string , and need to be converted to something look this is my data inside the database of the record

[{"id":2,"value":25,"tittle":"Calamares de mar"},{"id":3,"value":95,"tittle":"Cereal de almendras"}]
Activity icon

Replied to Laravel Get 4 Records From Each Object Of Collection

@michaloravec thanks but, I dont understand how to use it this way, just via Laravel Mirror Elloquent model look at this error...

@foreach ( $order->result as $info )
{{ $info->tittle }}
@endforeach


Invalid argument supplied for foreach() (View:

sorry am so new on this...

Activity icon

Replied to Laravel Get 4 Records From Each Object Of Collection

Hi @michaloravec thanks you!!! that is perfect I got the array with the object now... but how do I print them on the blade view page? should I use a for each? am getting an error, gotta clue? thanks in advance

this give an error

@foreach ( $order->result as $info )
{{ $info->tittle }}
@endforeach


Invalid argument supplied for foreach() (View:
Activity icon

Replied to Laravel Get 4 Records From Each Object Of Collection

@michaloravec with pluck got this

return $result = $user->wishes->pluck('tittle', 'id');

{
"2": "Calamares de mar",
"3": "Cereal de almendras"
}
Activity icon

Replied to Laravel Get 4 Records From Each Object Of Collection

@michaloravec Hi, look when I use the pluck, I just can call 1 record , If I 2 it keys up, with 3 parameters it dont shows up...

take a look to this code, this make the thing work , but in some ocation I made the same result with pluck but this time I cant get this result HOW TO?

			return	$subset = $user->wishes->map(function ($user) {
				return collect($user->toArray())
				->only(['id', 'value', 'tittle'])
				->all();
			});

return

[
{
"id": 2,
"tittle": "Calamares de mar",
"value": 25
},
{
"id": 3,
"tittle": "Cereal de almendras",
"value": 95
}
]
Activity icon

Started a new Conversation Laravel Get 4 Records From Each Object Of Collection

Hi , I want to call a collection but just with the records of value tittle and id ... ? how to do it... because i dont need to use all tthe information of the collection objects... thanks

[
{
"id": 2,
"tittle": "Calamares de mar",
"slug": "calamares-de-mar",
"video": "25980357",
"introduction": "Vamos a cocinar este plato de calamares con sobrasada, para el que hemos usado una traída directamente de productores autóctonos ibicencos. Al final de la receta, te contamos dónde encontrar este característico embutido en varias superficies comerciales de España.",
"description": "The typical beginner, whether they realize it or not, first learns procedural programming. But, before too long, they level up. Suddenly, an entirely different paradigm is introduced: object-oriented programming. Little do they know that theyll spend years researching and learning exactly what it means to work with objects and messages.In this series, youll be introduced to the core principles of object-oriented programming in PHP. Well begin with the basic constructs and work our way up Vamos a cocinar este plato de calamares con sobrasada, para el que hemos usado una traída directamente de productores autóctonos ibicencos. Al final de la receta, te contamos dónde encontrar este característico embutido en varias superficies comerciales de España.",
"instructor_id": "1",
"test": 0,
"live": 1,
"free": 0,
"promotion": 1,
"value": 25,
"disccount": 0.1,
"approve": 1,
"cover": "",
"certificate": null,
"file1": null,
"selled": 0,
"created_at": "2020-10-08T15:37:11.000000Z",
"updated_at": "2020-10-08T15:37:11.000000Z",
"pivot": {
"user_id": 1,
"course_id": 2
}
},
{
"id": 3,
"tittle": "Cereal de almendras",
"slug": "cereal-de-almendras",
"video": "25980357",
"introduction": "Las almendras son uno de los frutos secos más nutritivos del planeta, tienen un sabor delicado y dulzón, y contienen infinidad de propiedades beneficiosas para nuestro organismo.",
"description": "Las almendras son uno de los frutos secos más nutritivos del planeta, tienen un sabor delicado y dulzón, y contienen infinidad de propiedades beneficiosas para nuestro organismo. Entre sus bondades destaca que ayudan a fortalecer los huesos, el cabello, la piel y son buenas para el corazón, por ello la Federación española del corazón recomienda su consumo.",
"instructor_id": "1",
"test": 0,
"live": 1,
"free": 0,
"promotion": 1,
"value": 95,
"disccount": 0.1,
"approve": 1,
"cover": "",
"certificate": null,
"file1": null,
"selled": 0,
"created_at": "2020-10-08T15:37:11.000000Z",
"updated_at": "2020-10-08T15:37:11.000000Z",
"pivot": {
"user_id": 1,
"course_id": 3
}
}
]
Oct
05
1 month ago
Activity icon

Replied to How To Use WITH With 2 Parameters

WOWWWW MAN!!! THAT DO THE MAGIC!! , THANKS SR @sinnbeck

Activity icon

Started a new Conversation How To Use WITH With 2 Parameters

Hi I am willing to know how to pass an array inside a with

->with( 'alert' , [ 'errorIcon' , 'second param message' ] )

I have to do this because I cant GET a WITH array

->with( 'alert' , 'Your order is now lock' )->with( 'alertIcon' , 'error' );

thanks

Sep
24
2 months ago
Activity icon

Replied to How To +1 To DB

perfect :) thanks @braunson

Activity icon

Started a new Conversation How To +1 To DB

Hi , I want to add +1 to the counter of the DB but how?? got this

public function addGuaranteeTry()
{
	$this->update( [ 'guarantee_trys' =>   // here goes the magic... //    ] );
}
Sep
20
2 months ago
Activity icon

Started a new Conversation Vapor Error No More Than 300 Files Upload...

I was wondering , I am deploying with laravel vapor , but got this error that I cant upload more than 300 files to aws labda, I read and I understand that there should just be the must small amount of code,.... but where should place this folder callerd IMG? because I always go into public/img/ all the content of image files go there

So now I am lost, no idea where I should put the images...

Thanks a lot

Activity icon

Started a new Conversation Vapor Error Deployin With Windows 10, Any Help?

DEPLOYING TO VAPOR WITH WINDOWS GOT THIS ERROR


  The command "npm ci && npm run dev && rm -rf node_modules" failed.                                                                                      
                                                                                                                                                          
  Exit Code: 1(General error)                                                                                                                             
                                                                                                                                                          
  Working directory: C:\Users\danie\Apps\LMAcademy/.vapor/build/app                                                                                       
                                                                                                                                                          
  Output:    


  'rm' is not recognized as an internal or external command,                                                                                              
  operable program or batch file.

Any clue how to solve it?

Sep
17
2 months ago
Activity icon

Awarded Best Reply on HELP, I Cant Use OrWhere

Please do not make an answear, I just figure it out and I cant cancel the question, end with this

        return $this->clientOrders()
        ->where(function (Builder $query) {
            return $query->where('signed', 0)
            ->orWhere('finished', 0);
        })
        ->get();

same as laravel documentation = https://laravel.com/docs/7.x/eloquent-relationships#querying-relations

Activity icon

Replied to HELP, I Cant Use OrWhere

Please do not make an answear, I just figure it out and I cant cancel the question, end with this

        return $this->clientOrders()
        ->where(function (Builder $query) {
            return $query->where('signed', 0)
            ->orWhere('finished', 0);
        })
        ->get();

same as laravel documentation = https://laravel.com/docs/7.x/eloquent-relationships#querying-relations

Activity icon

Started a new Conversation HELP, I Cant Use OrWhere

Hi, I am trying to use orWhere in this code ,

    public function clientOrders()
    {
        return $this->hasManyThrough(
            'App\Order',
            'App\UserProvider',
            'user_id', // Foreign key on UserProvider table...
            'portfolio_id', // Foreign key on User table...
            'id', // Local key on Order table...
            'id', // Foreign key on UserProvider table...
        );
    }


    public function clientOrdersOnReview()
    {
        return $this->clientOrders()->where( 'signed' , 0 );
    }

this code is working fine but I want to do something like this

     return $this->clientOrders()->where( 'signed' , 0 )->orWhere( 'finished' , 0 );

But it RETURNs all the orders from all the users....

I am trying to recreate this same laravel code

		return user()->clientOrders()
		->where('signed', 0)
		->orWhere('finished', 0)
		->get();

this return all the orders...

BUT it weird because I can do this double where

		return user()->clientOrders()
		->where('signed', 1)->where('finished', 0)
		->get();

and actually the code runs perfectly and makes the query!!! thanks for any help or hint

Sep
10
2 months ago
Activity icon

Replied to The Openssl Extension Is Required For SSL/TLS

--------- AM ON WINDOWS 10 ----- Hi , I want to give a stupid solution... but some one can run into it, after trying to update to PHP 7.4.10 the last version, I uncomment and made A LOT OF THINGS... I was reading the files inside the PHP and just came out that there wasent a php.ini file so I copy the file called

php.ini-development -> to php.ini make a copy // I DID NOT HAVE THAT FILE!!! check your folder!!

copy and paste and rename it to php.ini ---------- this file was the one I modify , after that I re run all and that make the magic :) so --------- AM ON WINDOWS 10 ----- HOPE SOME ONE HELPS THIS

Sep
08
2 months ago
Sep
07
2 months ago
Activity icon

Started a new Conversation HELP!!, HOW To RETURN The Attached Object Created?

HOW to RETURN the attached object created?

return user()->providerConnections()->attach( $provider );

this code creates a new record on the database, but I can't return the object and I need it to know the actual ID created with this attachment, therefore make another action...

thanks in advance

GET THIS ERROR

Trying to get property 'pivot' of non-object
Activity icon

Replied to How To Use Same Laravel Nova's Global Search ?

@bugsysha itt seems expensive, I mean each time a letter is typed , it made the charge... ? am correct?

Sep
04
2 months ago
Activity icon

Started a new Conversation How To Use Same Laravel Nova's Global Search ?

I am using Nova, And I feel very good working with the search engine, and it's okay for me to use the same method of search on my front end BUT, I am wondering how I can get the same speed result?

How can I make the same but in my front end, I am new at this with laravel, I understand that I must do some queries with the SQL but HOW??

can you give me a hint? I think it's okay to go with Vue Axios call on real-time each time I type on the search bar??? thanks for the advice...

Sep
01
2 months ago
Activity icon

Replied to How Does Laravel Nova's Global Search Work?

Hi, @bobbybouwmann I was just reading this post with your comments on it, and read this

Well Nova is using normal SQL queries to perform searches on your models

I am using Nova , And I feel very good working with the search engine, and its okay for me to use the same method of search on my front end BUT, I am wondering how I can get the same speed result?

How can I make the same but in my front end, I am new at this with laravel, I understand that I must do some queries with the SQL but HOW??

can you give me a hint? I think it's okay to go with Vue Axios call on real-time each time I type on the search bar??? thanks for an advice...

Aug
26
2 months ago
Activity icon

Replied to Opinion And Feedback About Calling A $user...

Just do the helper, like it, because you can call this inside the controller, I can't do it with the View facade, thanks!!

Activity icon

Replied to Opinion And Feedback About Calling A $user...

thanks you @michaloravec for your feedback on this matter! really appreciate it!

Activity icon

Replied to Opinion And Feedback About Calling A $user...

@michaloravec , Hi Michael, yes I haad been using the Auth::User() but don't you feel that is too much large to type it every time ... don't you feel its better to call

$user.......
$user->account
$user->profile
$user->wallet()

BUT - all this above dont have to been called before, just on the appProvider

I think it is faster to do it with the View facade, or what do you think?

Activity icon

Started a new Conversation Opinion And Feedback About Calling A $user...

Hi, laracast community I have been thinking about what's the best way to call a User in laravel projects, I think that there is no app if there is no USER , because you have the landing page where all are GUEST, But when we are really into the THING there must be a user, so my thoughts are that in all VIEWS and CONTROLLERS must be the instance of the USER , so in the app service provider I create this:

    public function boot()
    {
        View::composer( [ 'pages.*' ] , UserComposer::class );
    }

//// on UserComposer class got thiss

$view->with( 'user', Auth::user() );

So... now I can access all the pages to the instance $user, I want to have this instance in my controllers to... but I don't know how to do it, now I ask my self... This is the right way to do it? , I mean should I call this instance in the controllers too, and can be called in the MODELS?

I end up with this because I see that I have to call this Auth::user() in all the controller's methods and then in the view blade the same thing, so I want to know how do you manage this? whats the best way to affront this.

Very grateful to count with this excellent laracast forum community Thanks in advance for your feedback

Regards Santino

Aug
16
3 months ago
Activity icon

Replied to ASSISTENCE! - How To / Auth In Constructor /

Found an exellent video of how to manage view composers

https://www.youtube.com/watch?v=7QWZxjgvEQc

very good video

Activity icon

Replied to Sublime Text 3 - Terminal

use TERMINUS I use it is wonderful

https://packagecontrol.io/packages/Terminus

Aug
12
3 months ago
Activity icon

Replied to How To Check Mail Is Send Successfully In Laravel

Mail::send(...)

if( count(Mail::failures()) > 0 ) {

   echo "There was one or more failures. They were: <br />";

   foreach(Mail::failures() as $email_address) {
       echo " - $email_address <br />";
    }

} else {
    echo "No errors, all sent successfully!";
}

Got this code from https://stackoverflow.com/questions/32882357/check-mail-is-sent-successfully-or-not-on-laravel-5

Aug
10
3 months ago
Activity icon

Replied to Help Calling Information From Products Model

thanks @piljac1 I will do the modification base in this!