GiacomoM

GiacomoM

Member Since 3 Years Ago

Experience Points 2,280
Experience Level 1

2,720 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 1
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

06 Oct
2 years ago

GiacomoM left a reply on Page Continue Loading

The problem is in chrome I don't get any message from "network" tab. Nothing. The page is just keep loading.

For the debug: can you give me a link to how to to debug? In my .env file the debug is already set to true.

04 Oct
2 years ago

GiacomoM started a new conversation Page Continue Loading

Hi, I have a problem with blade I guess. My page keep loading without showing anything.

I tried to clean the blade file and just add something like "hello" in the file, and everything is ok. But if I add the code I get that error.

The strange thing is that I get this behaviour only when I visit the website from remote connection. If I visit the site inside the net I do not get this behaviour.

Do you know if laravel needs other port opened other than 80?

Anyone can help me? I do not know how solve it.

12 Mar
3 years ago

GiacomoM left a reply on Exclude A Directory From The Route

Nope, it does not work :(

GiacomoM left a reply on Exclude A Directory From The Route

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    RewriteCond %{REQUEST_URI} !^/phpshell

    # Redirect Trailing Slashes If Not A Folder...
    #RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

GiacomoM left a reply on Exclude A Directory From The Route

Because my apache default directory is the "public" directory.

GiacomoM started a new conversation Exclude A Directory From The Route

Hi, I need to exclude a directory from the route, but I can not figure it out.

The directory is in the public folder, and I added this line in the .htaccess:

RewriteCond %{REQUEST_URI} !^/phpshell

It does not work.

Can you help me please?

27 Feb
3 years ago

GiacomoM left a reply on Input Old And Array

Thanks, I will try and I will answer to you.

GiacomoM left a reply on Input Old And Array

Any help? Thanks

26 Feb
3 years ago

GiacomoM left a reply on Named Route "/" -> Wrong Url()

Try this:

URL::route('home')

GiacomoM left a reply on Input Old And Array

I already do it. But I need a server validation either.

GiacomoM left a reply on Input Old And Array

I need several input text boxes, i don't know how many, it depends on user's choice. I manage them with angularjs.

GiacomoM started a new conversation Input Old And Array

Hi, I have a form like this:

<input type="text" name="field[]" />

I need to retrieve the value with the old function, but I am not able to. How can I do that?

Thanks.

21 Feb
3 years ago

GiacomoM left a reply on Where Clause For Relationship

Thank you, it works.

GiacomoM started a new conversation Where Clause For Relationship

Hi, I have an eloquent model that has the "hasOne" relationship with another model.

I need to get all records of model that have a particular condition for relationship model. So I need to use where clause not for the pivot model, but for the "child" (its not child cause there is "hasOne" relationship) model.

How can I do that?

Thanks

20 Feb
3 years ago

GiacomoM left a reply on Override Old Input Values

Ok, you forgot to mention the empty model part. Now it sounds good :)

Thank you for your help.

GiacomoM left a reply on Override Old Input Values

You did not override the value, you used a default value. The difference is thin, but there is :)

GiacomoM left a reply on Override Old Input Values

That snippet let you to override old input values. That's my initial question.

GiacomoM left a reply on Override Old Input Values

I did not talk about the Controller, of course the 2 controllers are different. I just wanted to know If I can use the same view without modifying it.

GiacomoM left a reply on Override Old Input Values

I found out like this:

Input::merge(array('title' => 'new value'));
Input::flash();

GiacomoM left a reply on Override Old Input Values

There is a problem when I am in add record: $user is null.

So I have to always check if $user is null before assigning the value.

19 Feb
3 years ago

GiacomoM started a new conversation Override Old Input Values

Hi, I am creating an edit record view, and I would like to use my add record view.

The problem is that I need to override the old input values, so the view can be the same.

I mean, in the file I have this code:

<input type=text required class="large required{{ ($errors->has('place')) ? " i_error" : "" }}" value="{{ old('place') }}" />

if I could override the old('place') function, I can reuse the add form to edit a record.

Is is possible?

Thanks.

14 Feb
3 years ago

GiacomoM left a reply on Create A Cookie Before Redirect

I used the facade, thanks.

GiacomoM left a reply on Create A Cookie Before Redirect

In Laravel 5.2? Is this Laravel 4 code?

GiacomoM started a new conversation Create A Cookie Before Redirect

Hi everybody, I need to create a cookie before saving new record and before redirecting the user.

I read docs but I didn't figure out. Can you help me pls?

This is the controller function I use to save record:

public function postEvent(Request $request)  {
    ...
    return redirect()->route('user.my_profile')->with('message', Lang::get('reserved_area.event.added'));
}

Thanks.

05 Feb
3 years ago

GiacomoM started a new conversation Blade: Check If Old Values Are Empty Or Not

Hi, as the subject, I need to know if the old values are empty or not, in blade. I mean, I need to know if we are coming back from a post or we are in the first page request.

How can I do it?

Thanks.

GiacomoM left a reply on [Laravel 5] Modify Input Before Validation

Why don't use this?

$request->merge(array('inputname' => 'new value'));

its clean and unobtrusive.

GiacomoM left a reply on Form Validation: Old Values Stopped To Work

I got it.

To use this captcha: https://github.com/mewebstudio/captcha

I added this code line to kernel.php file:

\Illuminate\Session\Middleware\StartSession::class

in the $middleware property. Thats the error. Even if I don't know why, I still don't know Laravel so deeply to understand the reason.

GiacomoM left a reply on Form Validation: Old Values Stopped To Work

Anyone can help me? I don't know why its happening.

04 Feb
3 years ago

GiacomoM started a new conversation Form Validation: Old Values Stopped To Work

Hi, as subject, I don't know why the old values of a form stopped to work when the validation fails. I mean,all input are empty, and even the "errors" variable is empty (but the validation fails, so it should be full).

Do you know how can I solve it?

Thanks in advance.

p.s. I added the "csrf_field()" field.

01 Feb
3 years ago

GiacomoM started a new conversation BotDetect Captcha And Laravel 5.2

Hi, somebody tried BotDetect Captcha with Laravel 5.2?

I am trying to use it without success. It seems Laravel does not recognize BotDetect routes.

26 Jan
3 years ago

GiacomoM left a reply on Include A Pure Javascript File With Blade

I know its not the best way to go. Thanks for the link, I will see if I have time to study it.

GiacomoM left a reply on Include A Pure Javascript File With Blade

I use angularjs, so I need to include a javascript inside script tag (I have a controller).

Anyway I can do the same thing inside the script tag. I just don't like to much write js code in *.blade.php file, but I don't know if I can do in any other way.

GiacomoM started a new conversation Include A Pure Javascript File With Blade

Hi, I need to include a javascript file with blade. I mean pure javascript code, not the script tag. Is it possible?

Like this:

<script>
    javascript code;
    @include js file
    ....
    javascript code
</script>

Thanks

25 Jan
3 years ago

GiacomoM left a reply on Flickr Adapter For Flysystem

"NO" is the answer I was looking for from the beginning.

@martinbean I don't wanna be rude, but you can write whatever you want (and I read what you wrote), the things don't change. There is nothing in IT you can not do it, and I am able to do it. I just don't have time, so I wanted to know if already exists.

I right now found this one, I have to study it:

https://github.com/academe/flickr

GiacomoM left a reply on Flickr Adapter For Flysystem

Sorry @martinbean , but your first reply is not an answer. You didn't say anything about the question. I know Flickr is not a filesystem, but you still could create an adapter to use flysystem with its apis.

GiacomoM left a reply on Flickr Adapter For Flysystem

Thanks for the reply.

GiacomoM left a reply on Flickr Adapter For Flysystem

I don't know what's wrong with my question.

Laravel uses flysystem to abstract filesystem functions and it interfaces with some cloud storage systems (like "Amazon S3", "Dropbox", ecc).

I would like to know if there is an adapter for flickr.

GiacomoM left a reply on Flickr Adapter For Flysystem

I know flickr is not a flysystem, indeed I need a flysystem adapter for flickr.

GiacomoM left a reply on Flickr Adapter For Flysystem

Nobody knows?

22 Jan
3 years ago

GiacomoM started a new conversation Flickr Adapter For Flysystem

Hi, as the subject does, somebody knows a flysystem adapter for flickr?

thanks

21 Jan
3 years ago

GiacomoM left a reply on Redirect If Not Logged

Thanks, it worked like a charm :)

GiacomoM started a new conversation Redirect If Not Logged

Hi, I have some route that need to be logged to be seen. This is the code of the routes:

Route::group(['middleware' => 'auth'], function() {
            Route::get('string, ['as' => 'user.add_event', 'uses' => 'UserController@addEvent']);
 });

It works, but the problem is that if the user is not logged, he is redirected to "login" route, which is not present, instead of being redirected to "auth\login" route.

How can I solve it?

Thanks.

20 Jan
3 years ago

GiacomoM left a reply on Route To AuthController Not Working

The name of the route is unique, and the auth controller works for anything else (login, logout, registration) but this route.

19 Jan
3 years ago

GiacomoM started a new conversation Route To AuthController Not Working

Hi, I don't know why the same route function does not work in AuthController, when it works in another controller.

This does not work:

Route::get('string', ['as' => 'complete_registration', 'uses' => 'Auth\AuthController@getCompleteRegistration']);

This works:

Route::get('string', ['as' => 'complete_registration', 'uses' => 'UserController@getCompleteRegistration']);

Of course the "getCompleteRegistration" function is present in both controllers.

You know why? Thanks.

GiacomoM left a reply on How Relationships Work

Thanks to everybody for your reply. :)

18 Jan
3 years ago

GiacomoM started a new conversation Get The Where Clause From A Querybuilder Object

Hi, as the title, there is a way to get the where clause of a querybuilder object?

I need to pass it to another function instead of recreating it.

Thanks.

17 Jan
3 years ago

GiacomoM left a reply on How Relationships Work

Sorry, but you didn't answer to my question.

If I do this:

$father->child->col1;
$father->child->col2;

how many times the query is executed?

16 Jan
3 years ago

GiacomoM started a new conversation How Relationships Work

Hi, I would like to know how eloquent relationships work.

Let's suppose we have 2 Models with an has-one relationship.

If I do:

$father_model->child

When the query is executed? Everytime I use those code? If I do:

$father->child->col1;
$father->child->col2;

how many times the query is executed?

Thanks for the reply.

11 Jan
3 years ago

GiacomoM started a new conversation Route Optional Parameter But Not Variable

Hi, I would like to know if its possible to have an optional parameter for a route without being a variable. I mean something like that:

Route::get(Lang::get('route.key') . '/{id}/{slug}/' . Lang::get('route.other_key') . '?', function ($id, $slug) {

Thanks

GiacomoM left a reply on Pagination In One To Many Relationship

Does the name make difference?

I used your name "getRelationPaginationAttribute" and it worked.