razausmankhan

razausmankhan

Member Since 7 Months Ago

Experience Points
11,250
Total
Experience

3,750 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
105
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 3
11,250 XP
Oct
18
1 week ago
Activity icon

Replied to Laravel Online/offline Web App

i haven't made the system yet i am designing it its always best to tackle these issues first

im trying to find all the possible and the best approach i can take for this type of application

Activity icon

Replied to Laravel Online/offline Web App

no actually it will have multiple clients and the client also will have multiple locations and accounts

Activity icon

Replied to Laravel Online/offline Web App

Like i mentioned in the post making the system is not a problem the problem is how do i make a web app work fully 100% offline

i've thought about making it a desktop app using electron but the only thing i am worried about is how it would work offline

lets say i made a complete web app the instance i unplug my internet and reload the page it won't even load

also is it possible to do something like this

if internet is available use the servers db if internet is down use the local db

and maybe a cron job that syncs every hour etc when the internet is up

The other thing i was thinking was using PWA but i don't know much in that area

so all i am looking for is a clear picture of how such a thing is doable

Activity icon

Replied to Laravel Online/offline Web App

@sergiu17 i understand that you can store data for offline use but what i am trying to do is get the whole web app run offline

Activity icon

Started a new Conversation Laravel Online/offline Web App

Ok so i want to make a POS in laravel and its pretty straightforward on how to do that

However there is this one requirement that got me thinking of any possible workarounds

That requirement is that it should be able to run offline aswell

Like if i don't have internet for 2 days it should still do all the crud operations and sync back up when internet comes back

any ideas on how to go around that ?

i would prefer a solution that lets me stay in the browser , i did find something about making your laravel app a desktop one through electron but i think that would bring a learning curve for which i dont have much time

Jun
26
4 months ago
Activity icon

Started a new Conversation Best/Secure Practice To Store S3 Credentials

Should i put my S3 credentials in 'filesystem.php' or in '.env' , it works locally if i put it in .env but the .env file is in git ignore.

I just want to know the best/secure practice

May
31
4 months ago
Activity icon

Replied to Uncaught ReferenceError: Validator (my Object Name ) Is Not Defined

sorry my bad i thought modules were included in the browser console

Activity icon

Replied to Uncaught ReferenceError: Validator (my Object Name ) Is Not Defined

so i changed the name validator just in case this is what i did

let blah = require('./form_validation');
blah.new();

this does run the function and show the alert box when i reload the page but when i inspect and try to run it from console it shows the same error

Activity icon

Replied to Uncaught ReferenceError: Validator (my Object Name ) Is Not Defined

It still says the same in console VM2497:1 Uncaught ReferenceError: Validator is not defined at <anonymous>:1:1

Activity icon

Started a new Conversation Uncaught ReferenceError: Validator (my Object Name ) Is Not Defined

I have a file named "form_validation.js" and it has the following object


var Validator = {

        new: function(  ){
            alert("hello");
        },

}

and i have include it in my app.js file as follows

require('./bootstrap');

require('./config');
require('./components_scripts');
require('./form_validation');

But when i use "Validator.new" in the console it gives me this error

Uncaught ReferenceError: Validator is not defined

I've checked the compiled app.js file and the file is being compiled

Found a solution of setting the object into window global variable

isn't there a better way and isn't this setting things to global variable a bad practice ?

May
25
5 months ago
Activity icon

Replied to Change Key Names In A Collection

@michaloravec i actually have to change some other columns as well not just the relationship one

also the last code doesn't work for nested collections

Activity icon

Started a new Conversation Change Key Names In A Collection

So i want to change all the keys in a collection to something else so for example i want to change the key "pages" to "children" ( basically i am using jstree which uses a specific json input )

The problem is that the collection has nested collection as well and they are infinite so i don't know exactly the depth of collection. The collection is something like this

 Illuminate\Database\Eloquent\Collection {#4010
     all: [
       App\Page {#3983
         id: 4,
         name: "Home 1",
         url: "home 1",
         description: "home 1",
         sort_order: 5,
         menu_name: "Main Menu",
         parent_page_id: 1,
         created_by: null,
         updated_by: null,
         created_at: "2020-05-18 20:10:32",
         updated_at: "2020-05-18 20:10:32",
         pages: Illuminate\Database\Eloquent\Collection {#3995
           all: [
             App\Page {#4012
               id: 9,
               name: "Contact Page 2",
               url: "Contact Page 2",
               description: "Contact Page 2",
               sort_order: 9,
               menu_name: "Contact",
               parent_page_id: 4,
               created_by: null,
               updated_by: null,
               created_at: "2020-05-18 20:12:37",
               updated_at: "2020-05-18 20:12:37",
             },
           ],
         },
       },
       App\Page {#3996
         id: 5,
         name: "Home 2",
         url: "hom2",
         description: "home 2",
         sort_order: 6,
         menu_name: "Main Menu",
         parent_page_id: 1,
         created_by: null,
         updated_by: null,
         created_at: "2020-05-18 20:10:43",
         updated_at: "2020-05-18 20:10:43",
         pages: Illuminate\Database\Eloquent\Collection {#3993
           all: [
             App\Page {#4014
               id: 6,
               name: "Home 3",
               url: "hom3",
               description: "home 3",
               sort_order: 6,
               menu_name: "Main Menu",
               parent_page_id: 5,
               created_by: null,
               updated_by: null,
               created_at: "2020-05-18 20:10:53",
               updated_at: "2020-05-18 20:10:53",
             },
           ],
         },
       },
     ],
   }
May
23
5 months ago
Activity icon

Replied to Traverse All The Items In A Collection

Thanks :) but i used @nakov 's answer instead

Activity icon

Started a new Conversation Traverse All The Items In A Collection

is there a function to traverse a collection with all of it nesting items

i have a model named "Page" and its a self referencing table. So the pages table has a column of "parent_page_id" that determines if a page has a parent

Now i want all of the pages in the same fashion something like this

Home Page 
	-- Sub Home Page 1 
		-- Sub sub Home Page 1 
			-- Sub sub sub home page 1 
			-- Sub sub sub home page 2 
	-- Sub Home page 2 

About Page 
	-- Sub About Page 1 
	-- Sub About Page 2 

The problem i have is that i don't know how many nested pages (the depth) will be there so how do i solve it ?

May
12
5 months ago
Activity icon

Started a new Conversation Metronic Integration With Laravel

I have downloaded metronic_v7.0.0 and now i wanted to integrate it with laravel

i am following this (https://keenthemes.com/metronic/?page=docs&section=laravel-integration) tutorial but in step 3 the path specified are not in my metronic folder

app.js

import '../demo1/tools/webpack/vendors/global';
import '../demo1/tools/webpack/scripts';

app.scss

// base style
@import "../demo1/src/sass/style";

// skins for demo1 only
@import "../demo1/src/sass/global/layout/aside/skins/dark";
@import "../demo1/src/sass/global/layout/brand/skins/dark";
@import "../demo1/src/sass/global/layout/header/skins/base/light";
@import "../demo1/src/sass/global/layout/header/skins/menu/light";

in metronic folder there is a theme named "html_laravel" it uses demo 1 and i have easily integrated it with this( https://keenthemes.com/metronic/?page=docs&section=laravel-integration ) tutorial however this "html_laravel" theme supports only demo1

what should i do if want to integrate demo2 or demo 3 ... etc into laravel

laravel themes integration metronic