Andreas94

Andreas94

Member Since 2 Years Ago

Experience Points
3,050
Total
Experience

1,950 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-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 1
3,050 XP
Oct
21
4 weeks ago
Activity icon

Started a new Conversation Query Consumes Too Many Resources

Hi everyone, I have a question, when you visit the page, this consumes so many resources.

  public function getTeam($slug)    {
    $profilo    =   User::where('username', $slug)->first();
    $timeline = Timeline::where('id_user', $profilo->id)->orderBy('data','desc')->paginate('9');
    return view('front.pages.team.main', compact('profilo','giochi_votati_c','timeline'));
  }
          @foreach ($timeline as $value)
            @if($value->type == '1')
              @php
                $articolo = \App\Models\Articoli::where('id', $value->id_items)->where('is_published', '0')->first();
              @endphp
                #html
            @elseif($value->type == '2')
              @php
                $review = \App\Models\Review::with('Giochi','InfoGiochi','autore')->where('is_published', '0')->where('id', $value->id_items)->first();
              @endphp
                #html
            @elseif($value->type == '3')
              @php
                $preview = \App\Models\Preview::where('id', $value->id_items)->where('is_published', '0')->first();
              @endphp
                  #html
            @endif
          @endforeach

          {{ $timeline->links('vendor.pagination.simple-bootstrap-4') }}

But this is going to consume me too many resources, do you have ideas on how to simplify? using caches?

Oct
06
1 month ago
Activity icon

Started a new Conversation Commands For Scheduled Publication Does Not Work

Hi everyone, I need to schedule the publication of some articles, but it doesn't work without giving errors.

I have columns:

  • published_at with the data and hour for the publish
  • is_ published if 0 online - 1 scheduled - 2 draft
  public function handle()
  {
    date_default_timezone_set('Europe/Rome');
    $current_date =  date("Y-m-d H:m:s");
    // is_published = 0 online - 1 scheduled - 2 draft
    $select_article = \DB::table('articoli')->where('is_published', '1')->get();

    foreach ($select_article as $value) {
      if($value->published_at >= $current_date) {
        $articolo = Articoli::find($value->id);
         $articolo->is_published = '0';
         $articolo->save();
      }
    }
  }

the program runs but does not work. I tried to debug current_date and it works if I put an echo in foreach it works, but inside the if no..

Sep
14
2 months ago
Activity icon

Started a new Conversation Why /forum Do I Redirect To Public/forum?

I'm having a mystery about my Laravel. I installed the forum in public/forum and it works.

If I go to domain.com/forum I have a redirect to public/forum, but if I go to the forum/index.php it works. it's not even an Htaccess problem, because if I go to: forum/admin it works!

Do you have any ideas?

/public/forum/.htaccess:

<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /forum/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule \.(js|css|jpeg|jpg|gif|png|ico|map)(\?|$) /forum/404error.php [L,NC]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /forum/index.php [L]
</IfModule>

public/.htaccess

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

    RewriteEngine On

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

    RewriteCond %{HTTP_HOST} ^www\.domain\.net [NC]
    RewriteRule ^(.*)$ https://domain.net/ [L,R=301]

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

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]


</IfModule>

/httpdocs/.htaccess (root Laravel)

<IfModule mod_rewrite.c>
   RewriteEngine On 
   RewriteRule ^(.*)$ public/ [L]
</IfModule>

but other pages like: forum/topic/1-welcome/ they work very well.

Activity icon

Replied to Htaccess In Conflict

surely I would like to solve this problem in the router, but anyway I have verified and it seems that the problem is not him...

Sep
12
2 months ago
Activity icon

Replied to Htaccess In Conflict

The forum htaccess can be found in / public / forum, but as soon as I activate it, when I visit a forum page it returns an error 404.

will it be my fault with this router instruction?

Route::get('{platform}', '[email protected]');

if so, how can I limit this statement only to the words: ps4|xone|pc|switch?

with the htaccess I would have done:

RewriteRule ^(ps4|xone|pc|switch)/$ index.php?p=console&nome_console= [QSA,L]

but with laravel?

Activity icon

Replied to Htaccess In Conflict

has anyone ever installed a forum in laravel?

Sep
11
2 months ago
Activity icon

Started a new Conversation Htaccess In Conflict

Hi guys, I'm installing an IP.Board forum in Laravel in the public folder, but as active the mod_rewrite putting the forum htaccess, the forum is no longer accessible. I tried with Xenforo and also with him I have this error.

The forum no longer works as soon as I enable friendly url with htaccess. How can I make use of the forum's htaccess only in the / public/forum folder?

Aug
20
2 months ago
Activity icon

Replied to Crawler From URL With Symfony\DomCrawler

do you know something similar for laravel? https://github.com/scrapinghub/extruct.

unfortunately there is no way with the symfony crawler

Aug
19
2 months ago
Activity icon

Replied to Crawler From URL With Symfony\DomCrawler

The site has just moved the JSON and now it is:

<script id="server-app-state" type="application/json">{"slug":"red-dead-redemption-2"

for the occasion I have tried with

      $html = file_get_contents('https://next.igdb.com/games/red-dead-redemption-2');
      $crawler = new Crawler($html);
      $data = $crawler->filterXpath('//script[@type="application/ld+json"]');
      dd ($data);

but when I go to see the debug I notice that I extract the whole html page: https://pasteboard.co/IttgEba.png

why is my fileterxpath request completely ignored?

I also tried the json id, the one that gives me the chrome console if I ask to copy the xpath of the element:

      $data = $crawler->filterXpath('//*[@id="server-app-state"]');

the result is always the same.

Aug
17
3 months ago
Activity icon

Started a new Conversation Crawler From URL With Symfony\DomCrawler

Hi, I need to extract the JSON contained in data-react-props:

use Symfony\Component\DomCrawler\Crawler;
use Symfony\Component\CssSelector\CssSelectorConverter;

$html = file_get_html('https://www.igdb.com/games/simcity--2');
$crawler = new Crawler($html);
$data = $crawler->filter('div[data-react-class="GamePageHeader"]')->attr('data-react-props');

print $data;

But I always get the error

LOG.error: Expecting a DOMNodeList or DOMNode instance, an array, a string, or null, but got "simple_html_dom".
Activity icon

Replied to Save Image From Remote URL

Thanks @snapey for the supporto. Now i have this error:

$cover = file_get_contents('https:' . $game->cover->url);
$filename = rand().'-.'.str_slug($game->name, '-');
Image::make($cover)->save(public_path('/upload/cover/' . $filename));
$platform->immagine = '/upload/cover/' . $filename;

LOG.info: Encoding format (simcity) is not supported.

simcity is $game->name

I think I went into confusion...

Edit

I solved with:

Image::make($cover)->save(public_path('/upload/cover/' . $filename . '.jpg'));

Is it possible to take the original extension? getClientOriginalExtension()it does not work

Aug
16
3 months ago
Activity icon

Replied to Save Image From Remote URL

Again error LOG.info: [INVALID UTF-8 DATA] with:

$cover = file_get_contents('https:'. $game->cover->url);
Activity icon

Started a new Conversation Save Image From Remote URL

Hi guys

I'm trying to extract an image from an API.

With the variable $game->cover->url I get //images.igdb.com/igdb/image/upload/t_thumb/csbqnva4b4nzdjgkbe8c.jpg, I would like this image in /upload /cover but every tenativo I do I fail him.

This is my code:

$cover = file_get_contents($game->cover->url);
$filename = rand().'-.'.$cover;
Image::make($cover)->save(public_path('/upload/cover' . $filename));
$platform->immagine = '/upload/cover/' . $name_cover;
dd($platform);

But I get the error LOG.info: [INVALID UTF-8 DATA]

I also tried with:

$cover = file_get_contents($game->cover->url);
$name_cover = substr($cover, strrpos($cover, '/upload/cover/') + 1);
Storage::put($name_cover, $cover);
$platform->immagine = '/upload/cover/' . $name_cover;
dd($platform);

But with this new code I get the error: LOG.info: file_get_contents(//images.igdb.com/igdb/image/upload/t_thumb/csbqnva4b4nzdjgkbe8c.jpg): failed to open stream: No such file or directory

How do I save the image of the URL in my server?

Aug
15
3 months ago
Activity icon

Replied to Url Not Existing Leads To Error 500 Because I Use Too Large A Slug

The second opinion seems to me better, I added the resolveRouteBinding to the Platform model, But what should I indicate in the router?

I have to work in the file RouteServiceProvider?

Activity icon

Started a new Conversation Url Not Existing Leads To Error 500 Because I Use Too Large A Slug

Hi everyone, I need advice:

i have: domain.ext/slug which refers to a DB if there is an example:

ID slug 1 ps4 2 xone 4 pc

Depending on the slug he loads the articles of the platform, but if one accidentally goes to a page that does not exist.

Example: doamin.ext/press it does not receive error 404 but error 500 because it cannot find the value in the table.

How do I in the route indicate the "available" names for the url?

at the moment it is:

Route::get('{platform}', '[email protected]');

Something to limit the available platforms like:

Route::get('{ps4|xone|pc}', '[email protected]');

is such a thing possible?

Aug
09
3 months ago
Activity icon

Replied to Syntax Error, Unexpected '(', Expecting Identifier (T_STRING) Or Variable (T_VARIABLE) Or '{' Or '$'

I swear my eye didn't fall for me... Time wasted on bulls*** :S

Thanks Talinon

Activity icon

Started a new Conversation Syntax Error, Unexpected '(', Expecting Identifier (T_STRING) Or Variable (T_VARIABLE) Or '{' Or '$'

What's wrong? I really can't understand...

if (GDPR::where('id_user', Auth::user())->('type', '1')->exists())
    {
      GDPR::where('id_user', $user->id)->('type', '1')->update(['status'=>$request->get('gdpr_newsletter')]);
    } else {
      $gdpr = new GDPR();
      $gdpr->user_id = Auth::user();
      $gdpr->type = 1;
      $gdpr->status = $request->get('gdpr_newsletter');
      $gdpr->save();
    }

Error: http\Controllers\ProfiloController.php156

156 if (GDPR::where('id_user', Auth::user())->('type', '1')->exists())

Aug
06
3 months ago
Activity icon

Replied to Difficulty In Sending Text From The Editor MD To The Post Controller

in the controller? because I just can't pass the data, if I try to send it as the js as in the example:

[23:43:30] LOG.info: The given data was invalid. {"url":"http:\/\/127.0.0.1:8000\/admin\/articoli\/edit\/7234","previus":"http:\/\/127.0.0.1:8000\/admin\/articoli\/edit\/7234","input":{"_token":"8jmiOAam4WVOPNrtirYMgkQxhkddA8Jh3LRtC6Oo","titolo":"example md","slug":"example-md","game_p":"0","console_p":"0","tag":"as","gallery":null,"video":null,"fonte":null,"published_at":"2019-08-06 21:48:16","id_autore":"261","id_evento":"0","is_published":"0","immagine_manager":null}}

as you can see, "testo" is missing

Activity icon

Started a new Conversation Difficulty In Sending Text From The Editor MD To The Post Controller

Hi guys, I have successfully installed the Toast UI Editor MD, but I have problems sending data to the database.

Until now I have always had to do with input and textarea and it was enough for me to set the correct name, but how can I do now that the editor uses a div?

  var initial_form_state, last_form_state;
  var editor = new tui.Editor({
    el: document.querySelector('#editSection'),
    language: 'it_IT',
    initialEditType: 'markdown',
    previewStyle: 'tab',
    height: '500px',
    events: {
        change: function() {
          last_form_state = $('form').serialize();
        }
    }
  });

with console.log(editor.getValue()); I can receive the markdown data, but how do I send them to the post request?

Activity icon

Replied to How Do I Get Data From Toast UI Editor?

No idea? for now I did

  $(document).on("submit", "form", function(event) {
    $('[name=document__text]').attr('value', editor.getMarkdown());
    $(window).off('beforeunload');
  });
    <div id="editor"></div>
    <input type="hidden" name="testo" />

But I don't think it's the right way even if it works

Aug
05
3 months ago
Activity icon

Started a new Conversation How Do I Get Data From Toast UI Editor?

Hi guys, I have correctly installed Toast UI Editor, but I have problems saving the markdown text in the database

      var initial_form_state, last_form_state;
      var editor = new tui.Editor({
        el: document.querySelector('#editSection'),
        language: 'it_IT',
        initialEditType: 'markdown',
        initialValue: determineValue(this.props),
        previewStyle: 'tab', //vertical
        height: '600px',
        events: {
            change: function() {
              last_form_state = $('form').serialize();
            }
        }
      });

How do I save the text in the db? so far with CKeditor it was enough to indicate the name, but here it does not use a textarea but a div...

Aug
04
3 months ago
Aug
03
3 months ago
Activity icon

Replied to Best Practice To Manage Css And Js By Url

I already use the blade component but it becomes dispersive when you go to change or add a plugin.

I found this laravel/packer, what do you think? honestly I wouldn't want to use VUE, also because I would like to load the plugins only when needed and not always call them in all the pages...

i have plugins like ckeditor, select2, dropzone, ckfinder, lightgallery, flatpickr, easypiechart, noty and many others that are recalled in 8 blades of about 20.

if (\Request::is('article/*')) {
  $css  =   "...";
  $js   =   "...";
} elseif (\Request::is('review/*')) {
  $css  =   "...";
  $js   =   "...";
}

use this method? is it too rough?

Activity icon

Started a new Conversation Best Practice To Manage Css And Js By Url

Hi guys,

Which is the best practice to manage js and css for url? for example, I have lots of JS plugins that need to appear only on certain pages like CKEditor, Select2 etc...

I currently use the @yield('css') and @yield('js')but now that I have to change the editor I find myself having to intervene in so many blades...

I had thought of creating a controller that depending on the url recalls the specific js and css, so I have all the css and js called in a single file, making the changes and additions easier.

What is your advice?

Jul
07
4 months ago
Activity icon

Started a new Conversation Tracing Back To The Id Generated By An Insert

Hi guys, I'm catching on IP.Board to my laravel project, I need to insert queries without having to create a model.

I inserted in my post:


      \DB::table('forums_topics')->insert([
        'title'      => $articoli->titolo,
        'state'             => "open",
        'last_post'      => Carbon::now()->timestamp,
      ]);

but I need to get the id generated to insert it in this new query:

      \DB::table('forums_posts')->insert([
        'author_id'      => Auth::user()->id,
        'author_name'             => Auth::user()->username,
        'post_date' => Carbon::now()->timestamp,
        'post' => $request->get('testo'),
        'topic_id' => HERE
      ]);

in a simple new query I would have recalled the save() variable, but how can I do it here?

Jun
15
5 months ago
Activity icon

Started a new Conversation Delete Query After Checkbox Not Work

Hi guys, I have a list of elements, that if checkboxes are flagged, these elements must be eliminated otherwise you proceed with the change of the other fields:

  public function postOrderDLC(Request $request, $giocoId) {
    $giochi_dlc = GiochiDLC::where('id_gioco_main', $giocoId)->get();

    foreach ($giochi_dlc as $value) {

      if( Input::get('delete'.$value->id, false)) {

        GiochiDLC::where('id', $value->id )->delete();

      } else {

        $value->order = $request->get('order'.$value->id);
        $value->save();
      }

    }
    return \Redirect::back();

  }

        @foreach ($giochi_dlc as $value)

        <tr>
          <th scope="row">
            <div class="custom-control custom-checkbox">
              <input type="checkbox" class="custom-control-input" id="delete{{$value->id}}">
              <label class="custom-control-label" for="delete{{$value->id}}"></label>
            </div>
          </th>
          <td>{{$value->gioco->nome}}</td>
          <td><input type="text" class="form-control col-2" name="order{{$value->id}}" value="{{$value->order}}"></td>
        </tr>
          @endforeach

the fields are updated correctly whereas instead, even if I put the flag in a checkbox, the element is not deleted ... why? where am I wrong? This is a post request.

Jun
14
5 months ago
Activity icon

Started a new Conversation How To Send A Post Request In Dynamic Input Fields

Hi everyone,

It's been a while since I'd like to integrate dynamic input fields into my project as you can see in this example:

http://jsfiddle.net/lemonkazi/re8e2yov/

The question I have always asked myself is: How can I send a post request?

Up until now I have always taken the name which is unique and I put it in the post controller with a get request, how do you behave in these cases?

Jun
10
5 months ago
Activity icon

Replied to Error Composer When I Add A Repository

Ok no, i have again this problem.

but now:

Using version ^1.2 for toolkito/larasap
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: remove laravel/framework v5.8.0
    - Installation request for laravel/framework (locked at v5.8.0, required as 5.8.*) -> satisfiable by laravel/framework[v5.8.0].
    - Conclusion: don't install illuminate/support v5.8.0
    - Conclusion: don't install laravel/framework v5.8.0
    - toolkito/larasap V1.2.2 requires illuminate/support 5.5.x|5.6.x -> satisfiable by illuminate/support[5.5.x-dev, 5.6.x-dev].
    - toolkito/larasap V1.2.3 requires illuminate/support 5.6.x|5.7.x -> satisfiable by illuminate/support[5.6.x-dev, 5.7.x-dev].
    - don't install illuminate/support 5.5.x-dev|don't install laravel/framework v5.8.0
    - don't install illuminate/support 5.6.x-dev|don't install laravel/framework v5.8.0
    - don't install illuminate/support 5.7.x-dev|don't install laravel/framework v5.8.0
    - Installation request for illuminate/support 5.8 -> satisfiable by illuminate/support[v5.8.0], laravel/framework[v5.8.0].
    - Installation request for toolkito/larasap ^1.2 -> satisfiable by toolkito/larasap[V1.2.2, V1.2.3].


Installation failed, reverting ./composer.json to its original content.

maybe it is not comaptibile with laravel 5.8?

Activity icon

Replied to Error Composer When I Add A Repository

@VAN1310 - thank you very much solved only with:

"illuminate/support": "5.8",
Activity icon

Started a new Conversation Error Composer When I Add A Repository

I get this error when I try to add this repo to my composer:

https://github.com/alihesari/laravel-social-auto-posting

  Problem 1
    - Conclusion: remove laravel/framework v5.8.20
    - Conclusion: don't install laravel/framework v5.8.20
    - toolkito/larasap V1.2.2 requires illuminate/support 5.5.x|5.6.x -> satisfiable by illuminate/support[5.5.x-dev, 5.6.x-dev, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.5.44, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9].
    - toolkito/larasap V1.2.3 requires illuminate/support 5.6.x|5.7.x -> satisfiable by illuminate/support[5.6.x-dev, 5.7.17, 5.7.18, 5.7.19, 5.7.x-dev, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9].
    - don't install illuminate/support 5.5.x-dev|don't install laravel/framework v5.8.20
    - don't install illuminate/support 5.6.x-dev|don't install laravel/framework v5.8.20
    - don't install illuminate/support 5.7.17|don't install laravel/framework v5.8.20
    - don't install illuminate/support 5.7.18|don't install laravel/framework v5.8.20
    - don't install illuminate/support 5.7.19|don't install laravel/framework v5.8.20
    - don't install illuminate/support 5.7.x-dev|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.5.0|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.5.16|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.5.17|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.5.2|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.5.28|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.5.33|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.5.34|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.5.35|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.5.36|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.5.37|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.5.39|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.5.40|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.5.41|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.5.43|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.5.44|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.0|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.1|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.10|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.11|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.12|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.13|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.14|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.15|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.16|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.17|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.19|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.2|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.20|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.21|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.22|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.23|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.24|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.25|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.26|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.27|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.28|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.29|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.3|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.30|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.31|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.32|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.33|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.34|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.35|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.36|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.37|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.38|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.39|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.4|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.5|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.6|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.7|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.8|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.6.9|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.0|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.1|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.10|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.11|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.15|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.2|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.20|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.21|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.22|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.23|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.26|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.27|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.28|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.3|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.4|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.5|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.6|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.7|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.8|don't install laravel/framework v5.8.20
    - don't install illuminate/support v5.7.9|don't install laravel/framework v5.8.20
    - Installation request for laravel/framework (locked at v5.8.20, required as 5.8.*) -> satisfiable by laravel/framework[v5.8.20].
    - Installation request for toolkito/larasap ^1.2 -> satisfiable by toolkito/larasap[V1.2.2, V1.2.3].


Installation failed, reverting ./composer.json to its original content.

My composer is currently:

    "require": {
        "php": "^7.1.3",
        "arrilot/laravel-widgets": "^3.12",
        "artesaos/seotools": "^0.12.1",
        "bkwld/croppa": "^4.7",
        "ecrmnn/laravel-https": "^1.0",
        "fideloper/proxy": "^4.0",
        "greggilbert/recaptcha": "dev-master",
        "intervention/image": "^2.4",
        "jenssegers/date": "^3.4",
        "laravel/framework": "5.8.*",
        "laravel/passport": "^7.2",
        "laravel/scout": "^3.0",
        "laravel/socialite": "^4.0",
        "laravel/tinker": "^1.0",
        "laravelcollective/html": "^5.8",
        "laravelium/feed": "3.1.*",
        "laravelium/sitemap": "3.1.*",
        "silviolleite/laravelpwa": "^1.0"
    },

Where is the error?

Jun
09
5 months ago
Activity icon

Replied to Include Auth Or Personal Variable In Config.

I also have this problem, no idea?

May
17
6 months ago
Activity icon

Started a new Conversation Error Unable To Prepare Route [api/user] For Serialization. Uses Closure.

Hi guys, I have been carrying this error for several months, which is not a problem but I want to solve it:

In Route.php line 917:

  Unable to prepare route [api/user] for serialization. Uses Closure.

I read that you have to comment on the code in route / api.php

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});

after giving the command php artisan route:cache

But now I get the error:

In Route.php line 917:

  Unable to prepare route [{fallbackPlaceholder}] for serialization. Uses Closure.