nhayder

nhayder

Member Since 1 Year Ago

Doha

Experience Points
47,080
Total
Experience

2,920 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
332
Lessons
Completed
Best Reply Awards
2
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 10
47,080 XP
Jan
24
2 days ago
Activity icon

Replied to AJAX Call Not Working Of Safari But Working On Chrome

@snapey this is the request data

Request Data
MIME Type: application/x-www-form-urlencoded; charset=UTF-8
id: 43
article_id: 3
_token: nwqdqLgASjsCF1auWO0OBiDV4huG0Fj5KiarFfvk
Activity icon

Replied to AJAX Call Not Working Of Safari But Working On Chrome

@snapey this is what being send using developers/network/json


exception: "Symfony\Component\HttpKernel\Exception\HttpException"

file: "/Applications/MAMP/htdocs/app/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php"

line: 208

message: "CSRF token mismatch."

trace: [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, …] (43) ...etc

Activity icon

Started a new Conversation AJAX Call Not Working Of Safari But Working On Chrome

I'm using jquery to delete a user logs, My code is working on chrome and i can remove all logs as expected but with safari i'm getting this error

{
    "message": "CSRF token mismatch.",
    "exception": "Symfony\Component\HttpKernel\Exception\HttpException",
    "file": "/Applications/MAMP/htdocs/app/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php",
    "line": 208,
    "trace": [
        ...
    ]
}

this is my jquery ajax code

        $('#deleteUserLogHistory').on('show.bs.modal', function (event) {

          var button = $(event.relatedTarget)

          var elemID = button.data('id')
          
          var modal = $(this)

          modal.find('.delete-user-Log').val(elemID)

            // delete function
            $(".delete-user-Log").click(function(){

                // get item id
                var id = $(this).val();

                // get token value
                var token = $("meta[name='csrf-token']").attr("content");

                // deleting item
                $.ajax(
                    {
                        url: "/admin/logs/user/delete/"+id,

                        type: 'DELETE',

                        data: {

                            "id": id,

                            "_token": token,

                        },

                        success: function (){

                            // reload Page
                            location.reload();
                            
                        }

                    });

            });

        })

This is the method on my controller

    public function destroyUserRecords($id)
    {

        if (Gate::denies('activities.delete')) {
            
            return abort(403);
        
        }

        $delete = Activity::where('user_id', '=', $id);

        $delete->delete();

    }

Can anyone see a problem with me code, Before safari is not working?

Jan
20
6 days ago
Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

@fylzero yes i do have is it on the top of the page, otherwise it won't work on chrome, but if you mean the first line at the top??? i put it at the top first line and still not being able to get the data properly i'm still getting

[]
Jan
19
1 week ago
Activity icon

Started a new Conversation Safari Is Stripping Data From My Response Object

I've been facing this problem for sometime now and i'm hoping to find the if anybody faced same issue.

i'm using laravel 5.8 with vue + vuex.

in my app i have vue function that saves text on the page to a DB whitch is working fine on chrome and firefox.

Unfortunitly the code is not working on safari and as result of that i'm getting empty object [] instead of what i'm expecting.

this is my code

    saveText({commit}, [id, text, name, wIndex]){

        axios.put('/admin/designer/api/test/', {

            elem: text,

            elemName : name,

            elemId: id,

        })

        .then(function (response) {

            commit('UPDATE_W_ELEM', [name, wIndex, response.data]);

        })

        .catch(function (error) {

            Event.$emit('requestAlertDanger'); 

        });

    },

now in safari/network i have check the request data and they are available on the browser as expected

{
    "elem":"INTR O WIDGET","
    elemName":"title",
    "elemId":6
}

Then i'm hitting the text route and in my controller i have just simple it worked spitted out

    public function test(Request $request)
    {

        return 'Worked';

    }

And i can see the work worked available on the page, so basically the data are being submitted properly and received as expected in safari.

all good till this point.

NOW i need to work with actual data so i can save them into the database?

so i replace the (worked ) with actual data like $request->all(); but i'm [ ] empty response object on network response tab ( Resource has not content ) and data is empty ???

    public function test(Request $request)
    {

        return $request->all(); // returning blank/empty 

    }

Any ideas on how to fix this issue????

Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

@nakov yes i have some middlewares but i'm getting same results with or without.

please do let me know if you have a fix.

All the best

Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

@nakov i have check the return $request->all(); and this was the result []

[ ]

empty

Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

@nakov hi, I have made great improvements regarding my safari problem. after yesterday's discussion, and i was able to see data passed from my component to the controller.

Note i'm using laravel 5.8 with vue.js and vuex as my main javascript library across my app.

i will try to brief you about what i did so both of us will be on the same page.

this is almost same function but i made a test route for is

         saveText({commit}, [id, text, name, wIndex]){

            axios.put('/admin/designer/api/test/', {

                elem: text,

                elemName : name,

                elemId: id,

            })

            .then(function (response) {

                commit('UPDATE_W_ELEM', [name, wIndex, response.data]);

            })

            .catch(function (error) {

                Event.$emit('requestAlertDanger'); 

            });

        },

now in safari/network i have check the request data and they are available on the browser as expected

{
    "elem":"INTR O WIDGET","
    elemName":"title",
    "elemId":6
}

Then i'm hitting the text route and in my controller i have just simple it worked spitted out

    public function test(Request $request)
    {

        return 'Worked';

    }

And i can see the work worked available on the page, so basically the data are being submitted properly and received as expected in safari.

all good till this point.

NOW i need to work with actual data so i can save them into the database?

so i replace the (worked ) with actual data like $request->elem; but i'm getting white space in the network response tab ( Resource has not content ) and data is empty ???

    public function test(Request $request)
    {

        return $request->elem; // returning blank/empty 

    }

i hope i was able to explain it to you?

and do let me know if you think there is a fix for this

Jan
18
1 week ago
Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

@nakov Thank you man i will definitely check it out and let you know soon

Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

@fylzero it's a long file i just copied and pasted part of it, the part where you need to see the actual route.

i have some admin group and designer group then come the api group that one you are looking at above

Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

@fylzero you are exactly correct on this.

i just can't make it work

i tried everything but its not working.

Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

@nakov @fylzero this is my route as i'm sying it on web.php

Route::prefix('api')->group(function (){

    Route::put('/widget/text', '[email protected]');

});

Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

@nakov this is what is showing on the network tab when hitting the route


{
    "message": "The given data was invalid.",
    "errors": {
        "elem": [
            " field elem required."
        ],
        "elemName": [
            " field elem name required."
        ],
        "elemId": [
            " field elem id required."
        ]
    }
}

Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

@fylzero yes tried them all , patch, post, put, all of the as passing empty array on safari but they work as they should be on chrome

Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

@nakov this line

return $request;

was removed from the code, it was just for testing.

it's not there anymore i was explaining how things work

Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

@fylzero i'm hitting that end point in chrome ?????

NOT SAFAR ???

the code is fully working on chrome and firefox

Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

@nakov please read the hall conversation the

return $request;

was temperary just to check if i'm getting any data from axios.

you can read my initial post for permanent code as i have it on my app

Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

@fylzero by hardcoding the values like that

            await axios.put('/admin/designer/api/widget/text', {

                elem: 'some text here',

                elemName : 'some name here',

                elemId: 3,

            })

On the controller endpoint i'm checking if i'm receiving any data form axios before validation like this

    public function updatewidgettext(Request $request)
    {
    return $request; // <--- this

        $request->validate([

            'elem' => 'required|string',

            'elemName' => 'required|string',

            'elemId' => 'required|integer'

        ]);

        $name = $request['elemName'];

        $elemId = $request['elemId'];

        $elemText = trim($request['elem']);

        $updateWidget = Widget::findOrFail($elemId);
        
        $updateWidget->$name = Purifier::clean($request['elem'], 'designer');

        $updateWidget->save();
                
    }

And this is the result i'm getting when using safari


[ ] // empty 

so as a conclusion axios is not functioning as it should and the data are not being passed to laravel controller as we expected, But instead laravel is throwing validation error because no data has been received.

Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

@fylzero yes, i had same issue with another app that i was working on.

Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

@fylzero i tried all of the solutions you recommended but none of them fixed the problem

Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

@fylzero i will try doing all these and let you know, but it looks like axios on safari is submitting empty arrray??? so the validation on the controller method is throwing the error.

but the function is fully working on safari, This is really strange.

Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

@fylzero yes i'm using laravel mix and it's not a caching issue, I cleared it almost every time i make a change in the code

Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

i tried patch and post and get but still getting same error, as per example above it looks like the validation method is throwing exception because the required data values are empty.

if i tried this on chrome the function is working just fine and i can see the changes on the front end page.

Any further ideas on how to solve this issue ???

Activity icon

Replied to Axios Ajax Call Not Working Working On Chrome But Working Safari

what not to understand ???? same function above is working on chrome and but its giving issue on safari

Jan
17
1 week ago
Activity icon

Started a new Conversation Axios Ajax Call Not Working Working On Chrome But Working Safari

i'm struggling with this issue since a couple of hours now, on my app i'm requesting data from DB using axios ajax function.

this is the js function on my store.js store file

        async saveText({commit}, [id, text, name, wIndex]){

            await axios.put('/admin/designer/api/widget/text', {

                elem: text,

                elemName : name,

                elemId: id,

            })

            .then(function (response) {

                commit('UPDATE_W_ELEM', [name, wIndex, response.data]);

            })

            .catch(function (error) {

                Event.$emit('requestAlertDanger'); 

            });

        },

this is the route

Route::put('/widget/text', '[email protected]');

this is what i have on the controller


    public function updatewidgettext(Request $request)
    {

        $request->validate([

            'elem' => 'required|string',

            'elemName' => 'required|string',

            'elemId' => 'required|integer'

        ]);

        $name = $request['elemName'];

        $elemId = $request['elemId'];

        $elemText = trim($request['elem']);

        $updateWidget = Widget::findOrFail($elemId);
        
        $updateWidget->$name = Purifier::clean($request['elem'], 'designer');

        $updateWidget->save();
        
        Cache::forget('page-'.$updateWidget->page_id); // front page cached file

        return $updateWidget->$name;
        
    }

the function is working perfectly on chrome and firefox but not on safari, I'm not sure why by i getting this error

{
    "message": "The given data was invalid.",
    "errors": {
        "elem": [
            " field elem required."
        ],
        "elemName": [
            " field elem name required."
        ],
        "elemId": [
            " field elem id required."
        ]
    }
}

it looks like axios is not being able to pass the data on safari properly, ????

is there is anything i can do to solve this issue????

Any idea ????

Jan
10
2 weeks ago
Activity icon

Replied to Arabic Routes Returning Od Code

Oh now, there should be a way

Activity icon

Started a new Conversation Arabic Routes Returning Od Code

hi, in my app i'm using non-latin characters in routes

//  Original route
http://127.0.0.1:8000/en/articles/الاخبار

results

http://127.0.0.1:8000/en/articles/%D8%A7%D9%84%D8%A7%D8%AE%D8%A8%D8%A7%D8%B1

is there is a way to make routes UTF-8

any ideas

Jan
01
3 weeks ago
Activity icon

Replied to How To Embed Tweet Using Laravel And CKeditor

@bobbybouwmann i was thinking of it actually but everybody is used to say "NO USE Purifier package " where Ckeditor alone can protect that textarea without any extra packages ???

In other words? that's the only solution i has so far ??

thanks man

Dec
31
3 weeks ago
Activity icon

Replied to How To Embed Tweet Using Laravel And CKeditor

@bobbybouwmann So what is the solution to fix this issue

Activity icon

Started a new Conversation How To Embed Tweet Using Laravel And CKeditor

Clearly Ckeditor have tones of plugin that will help to embed tweets directly from the editor, just like the one i'm using, Nothing fancy about it.

this is the code as inserted my ckeditor

<blockquote class="twitter-tweet">
    <p lang="en" dir="ltr">Success is not a ladder. It is a road to be taken. Check out the New Nissan Patrol 2020.         
        <a href="https://twitter.com/hashtag/ConquerEverywhere src=hash&amp;ref_src=twsrc%5Etfw">#ConquerEverywhere</a>

    </p>&mdash; Nissan Middle East (@NissanME) 

<a href="https://twitter.com/NissanME/status/1209093566762541057?ref_src=twsrc%5Etfw">December 23, 2019</a>

</blockquote> 

// this is the javascript code that is being stripped
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

after placing the code as above i'm submitting the form to store data to DB, and this is where my sanitization package kicks in.

this is the CKeditor text field as i have it in my code

$updateContent->description = Purifier::clean($request->input('description'));

Basically the purifier package is stripping the script tags off the tweet???? in which it is breaking my entire tweet from rendering on the page.

So how to solve this problem ???

any ideas??????

Dec
29
4 weeks ago
Activity icon

Replied to Securing Public Form

yes i have seen it, and i implemented all what he did, but still not sure if what he did is enough.

Activity icon

Started a new Conversation Securing Public Form

I'm building a commenting system for my blog, so i have installed Ckeditor to be my primary wysiwyg editor, so ckeditor comes with its own sanitization and filtering system. in addition to that i've installed htmlpurifier package to sanitize user inputs before hitting the database.

    public function store(Request $request)
    {

        $request->validate([

            'body' => 'required|string',

        ]);

        $comment = new Comment();
        
        $comment->article_id = $request['article_id'];

        $comment->user_id = Auth::id();

        $comment->body = Purifier::clean($request->input('body'), 'comments');

        $comment->save();
        
        flash('success');

        return redirect()->back();
        
    }

on blade file i'm just letting the code to render on the page like this

<p class="mt-4 comment">

    {!! $comment->body !!} 

</p>

SO, my question is ??

Is that enough protection for my form ???

Please keep in mind that the comment form can be see only if a user is logged in

Any advice.

Dec
28
4 weeks ago
Activity icon

Replied to Looking For Recommendation For Marked Down Editor For My App Comment System

my users are not developers at all, and i'm currently using ckeditor its better than markdown editor, but i was told there is some security issue involved in putting WYSIWYG editor put there to public.

that's why i'm planning to change it to makedown.

Activity icon

Started a new Conversation Looking For Recommendation For Marked Down Editor For My App Comment System

i'm building a comment system for my app so i need a recommendation from someone who used a markdown editor from these packages out there.

i need to be able to give my users ability to add Links [href], Bold, italis and lists (ul + ol) as minimum

can anyone out there recommenda good and well maintained package i can use.

Dec
22
1 month ago
Activity icon

Awarded Best Reply on New Laravel 6 Installation Error

i run this

composer self-update

than i was able to complete the installation as laravel document.

all the best

Activity icon

Replied to New Laravel 6 Installation Error

i run this

composer self-update

than i was able to complete the installation as laravel document.

all the best

Activity icon

Replied to New Laravel 6 Installation Error

tried that still getting this error

Installing laravel/laravel (v6.8.0)
  - Installing laravel/laravel (v6.8.0) Loading from cache
Created project in basal.co.com
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Updating dependencies (including require-dev)

                                                                                           
  [ErrorException]                                                                         
  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?  
                                                                                           

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

Activity icon

Started a new Conversation New Laravel 6 Installation Error

i'm trying to install fresh version of laravel 6 locally?

as per document https://laravel.com/docs/master#installing-laravel i'm running this

composer global require laravel/installer

but i'm getting this error

hassan-MacBook-Pro:bander.co.com hassanmansor$ composer global require laravel/installer
Changed current directory to /Users/hassanmansor/.composer
Using version ^3.0 for laravel/installer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)

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

                                                                                           
  [ErrorException]                                                                         
  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?  
                                                                                           

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

any ideas ?

Dec
02
1 month ago
Activity icon

Replied to Looking To WYSIWYG Editor That Allows User To Embed Media (youtube, Twitter, .. Etc)

@rossiluca media embedding is taking place directly on blade template file, i'm using jquery as my main JS library, but embedding the media is happening using CKeditor to insert the media and blade file should fetch the

<oembed>https://www.youtube.com/watch?v=H08tGjXNHO4</oembed>

from youtube.

Please do let me know if you still need further clarifications

thanks

Activity icon

Started a new Conversation Looking To WYSIWYG Editor That Allows User To Embed Media (youtube, Twitter, .. Etc)

i'm using laravel 5.8 and i'm looking for WYSIWYG editor to offer basic text editing, but the more important thing is i need to allow my users to embed media from multiple locations (youtube, vimeo, twitter, instagram, ... etc).

i tried CKeditor 4 which is fine and they have automatic embedding features that at start looked very attractive to me, Unfortunately it looks like all embedded medias from admin area are returning tags.

<oembed>https://www.youtube.com/watch?v=H08tGjXNHO4</oembed>

i'm not fully aware of tags and how to use then but according to my research it looks like i need a 3rd party service to render oembed object to standard media object.

So does anybody have recommendation on which editor should i use ???

OR is there is away to convert tags without using 3rd party service.

Any ideas ???

Activity icon

Replied to Is There Any Option For WP OEmbed Class To Use In Laravel 5.4?

Hi, did you manage to make the auto embed functionality in your app. Im doing the same thing here but its not auto embedding

Nov
25
2 months ago
Activity icon

Replied to Delete All Records Except Recent 5 Using When User Logged In Not Working

@bugsysha Yes, I just noticed that option but till i'm ready to upgrade my app i'm happy with you suggestion

Thanks man :-)

Activity icon

Started a new Conversation Delete All Records Except Recent 5 Using When User Logged In Not Working

I have hasMany relationship to store user IP address

This is the model relationship

    public function ips()
    {
        return $this->hasMany(IpUser::class);
    }

so when user is logged in successfully i'm using laravel loggedin event to store the IP using event Listener like this

class StoreUserIpOnLogin
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(Request $request)
    {
        $this->request = $request;
    }

    /**
     * Handle the event.
     *
     * @param  Login  $event
     * @return void
     */
    public function handle(Login $event)
    {
        $user = $event->user;

        $user->ips()->create([

            'code' => request()->ip()
            
        ]);
    
    }

}

Things are going well so far but the DB are loaded with data now so i need to keep only last 5 IP records and delete the rest on same event.

So i updated the handle function above to keep last records and remove the reset like this


    public function handle(Login $event)
    {
        $user = $event->user;

        $user->ips()->create([

            'code' => request()->ip()
            
        ]);

        $user->ips()->orderBy('created_at','desc')->skip(5)->delete();
    
    }

Unfortunately, the code above is removing all user IPS and it not keeping last 5 records.

Any ideas on how to fix this issue.

Any ideas ????

Nov
23
2 months ago
Activity icon

Replied to How Precise Is Laravel Telescope ???

@fylzero sorry for my bad wording but YES, telescope will never ever handle caching i will only report it.

AGREED

Activity icon

Started a new Conversation How Precise Is Laravel Telescope ???

i'm wondering how precise is laravel telescope when it comes to caching, I'm using laravel 5.8 to cache some eloquent model queries forever because these query will rarely change.

my app is caching these quieres but it looks to me that caching is not remembered forever in telescope.

for example,....

example below i'm creating the intended cached files but next day (or a couple of hours later) when i run the query i see that telescope showing that original query was executed as if there was not cached files available on the app.

public static function getSudgestedArticles($lang)
{
    
    $sudggested = Cache::rememberForever('sudggested-articles', function () use ($lang) {

        return Article::with('poster')

            ->where('language', $lang)

            ->orderBy('id', 'desc')

            ->get();

    });
    
    return $sudggested;

}

So my question is???

How precise is telescope when it comes to caching????

is my code correct and why telescope is not fetching data from cached files.

any ideas

Nov
20
2 months ago
Activity icon

Replied to Caching Article Forever On Blade Template

@snapey hey, there was some issue with caching but i got that one sorted out, ..

It took me a while to find the error but its working just fine now.

thank you