rameezisrar

rameezisrar

Member Since 1 Year Ago

Experience Points 53,090
Experience Level 11

1,910 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 437
Lessons
Completed
Best Reply Awards 7
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.

18 Jul
1 day ago

rameezisrar left a reply on How To Manage Multiple Application Inside One

This has to be on the same system. You can restrict users based on roles to other apps/components

rameezisrar left a reply on Rollback Not Working As Intended

@ssquare

You may use the transaction method on the DB facade to run a set of operations within a database transaction. If an exception is thrown within the transaction Closure, the transaction will automatically be rolled back. If the Closure executes successfully, the transaction will automatically be committed. You don't need to worry about manually rolling back or committing while using the transaction method:

    DB::transaction(function () {

    
            $rink = Rink::create(
                [
                    'name' => $request->name,
                    'address' => $request->address,
                    'latitude' => $request->latitude,
                    'longitude' => $request->longitude,
                    'locker_room'=> isset($request->locker_room)?'1':'2',
                    'sticks_pucks'=>isset($request->sticks_pucks)?'1':'2'
                ]);

            HoursOfOperation::create(
                [
                    'rink_id' => $rink->id,
                    'opening_days' => json_encode($request->opening_days),
                    'opening_time' => $request->opening_time,
                    'closing_time' => $request->closing_time,
                    'timezone' => $request->timezone
                ]);

            Fee::create(
                [
                    'rink_id' => $rink->id,
                    'fee_per_hour' => $request->fee_per_hour,
                    'tax' => $request->tax
                ]);

        } );

    
17 Jul
2 days ago

rameezisrar left a reply on Vue Component Not Working

@digibiz You cannot call the js file like that as the webpack is versioning your app.js file when you run 'npm run watch'.

You need to include app.js like that

 <script  src="{{ mix('/js/app.js') }}"></script>
``

rameezisrar left a reply on Vue Component Not Working

@digibiz are you able to see this file when you view source of the page? paste your file code where you are loading the app.js file

rameezisrar left a reply on Vue Component Not Working

@digibiz make sure you are including app.js file.

rameezisrar left a reply on Vue Component Not Working

Your app.js should be something like that

Vue.component('follow-button', require('./components/FollowButton.vue').default);



const app = new Vue({
    el: '#app',
});

rameezisrar left a reply on Vue Component Not Working

@digibiz show your app.js file

16 Jul
3 days ago

rameezisrar left a reply on Laravel Authorization (Policy) To Check Himself

try this @

public function update(User $user)
{
    return $user->id === auth()->id();
}

rameezisrar left a reply on You Cannot Serialize Or Unserialize PDO Instances

paste your error track stack here @

15 Jul
4 days ago

rameezisrar left a reply on Laravel And Vue

@popcone Well, In that case, you don't even to worry about the backend. You can create your vue components only and test your components without the backend. Later you can pass your vue components to the backend developers.

Let say if you need to populate your vue components with API's data, then you grab the API's from the API developers and populate your vue components with the live data

rameezisrar left a reply on Pass Query Result To Vue Component Via Axios To Populate A Dropdown.

@finchy70 put your function implementation in the 'methods' field in your vue component and try then


methods: {
        
        getPrelims: function() {
                  axios.get('/prelims/prelim_list')
                    .then((response) => {
                        // handle success
                        console.log(response.data);
                      
                    });
            },
    },

 created() {
            

         this.getPrelims();
        },

rameezisrar left a reply on Pass Query Result To Vue Component Via Axios To Populate A Dropdown.

@finchy70 laravel already returns in json format so you can update your function


public function prelim_list()
    {
        return Prelim::orderBy('name', 'asc')->get();
    }

rameezisrar left a reply on Pass Query Result To Vue Component Via Axios To Populate A Dropdown.

@finchy70 now open this endpoint on your browser tab (you might include to 'api' i.e /api/prelims/prelim_list)

If you are getting the output on the browser tab then update the axios link on vue too as

 created() {
            function getPrelims() {
                axios.get('//api/prelims/prelim_list')
                    .then((response) => {
                        // handle success
                        console.log(response.data);
                      
                    });
            }

            getPrelims();
        },


rameezisrar left a reply on Pass Query Result To Vue Component Via Axios To Populate A Dropdown.

@finchy70 now console this

 console.log(response.data[0]);

what are you getting now?

rameezisrar left a reply on Laravel And Vue

@popcone Yes, all your vue components should be placed under the resources/js folder

and then you can register them in your app.js something like that

Vue.component(
  'subscribe-button-component',
  require('./components/SubscribeButtonComponent.vue')
);

rameezisrar left a reply on Pass Query Result To Vue Component Via Axios To Populate A Dropdown.

@finchy70 share your web.php file

Also, try this

 data(){
            return {
                preliminaries: '',
                selected: null,
                errors: []
            }
        },

And if the error still exists, try to only console.log the response first and not assigning it

something like

 created() {
            function getPrelims() {
                axios.get('/prelims/prelim_list')
                    .then((response) => {
                        // handle success
                        console.log(response.data);
                      
                    });
            }

            getPrelims();
        },

09 Jul
1 week ago

rameezisrar left a reply on Subscription "name" With Laravel Spark

@marathonstudios the 'id' and the 'stripe_plan' is key through which you can differentiate and take decisions based on that. But if you really want to include the plan name than this is what I did.

I created two custom tables 1)plan_categories 2)plans

if you have 'basic' category plan and then you can two plans under 'plans' table ie.e basic_monthly and basic_yearly with the fields including 'name'

 Schema::create('plan_categories', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title');
            $table->timestamps();
        });

 Schema::create('plans', function (Blueprint $table) {
            $table->increments('id');
        $table->string('plan_category_id');
            $table->string('name');
            $table->string('type');
            $table->string('plan_id');
            $table->string('price');
            $table->string('cost_price');
            $table->string('trial_days');
            $table->string('publish');
            $table->timestamps();
        });

In this manner you can manage your Plans from the Admin panel too

rameezisrar left a reply on Fetch V-tab Anchor Class

@nomguy why are you getting the element by id? Bind the class with the data

<a v-bind:class="{ active: isActive }"></a>

your script


data: {
  isActive: 'class_name'
}

rameezisrar left a reply on Installation Request For Kylekatarnls/update-helper

@snapey thank you for helping me out man. Means a lot :)

08 Jul
1 week ago

rameezisrar left a reply on Installation Request For Kylekatarnls/update-helper

@snapey

Updating the composer and then running the following command fixed it

 apt-get install php-common php-mysql php-cli

rameezisrar left a reply on Installation Request For Kylekatarnls/update-helper

@snapey Yes, I read that article. Thank you for sharing that. I have installed the missing extensions and now I am getting carbon deprecated error.

rameezisrar left a reply on Installation Request For Kylekatarnls/update-helper

@snapey After upgrading to the composer .18.6

when I hit


sudo composer install

I get this error

 Problem 1
    - Installation request for aws/aws-sdk-php 3.101.1 -> satisfiable by aws/aws-sdk-php[3.101.1].
    - aws/aws-sdk-php 3.101.1 requires ext-simplexml * -> the requested PHP extension simplexml is missing from your system.
  Problem 2
    - Installation request for phpunit/phpunit 7.5.13 -> satisfiable by phpunit/phpunit[7.5.13].
    - phpunit/phpunit 7.5.13 requires ext-dom * -> the requested PHP extension dom is missing from your system.
  Problem 3
    - Installation request for theseer/tokenizer 1.1.3 -> satisfiable by theseer/tokenizer[1.1.3].
    - theseer/tokenizer 1.1.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
  Problem 4
    - stripe/stripe-php v5.9.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - stripe/stripe-php v5.9.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - Installation request for stripe/stripe-php v5.9.2 -> satisfiable by stripe/stripe-php[v5.9.2].

  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/7.3/cli/php.ini
    - /etc/php/7.3/cli/conf.d/10-opcache.ini
    - /etc/php/7.3/cli/conf.d/10-pdo.ini
    - /etc/php/7.3/cli/conf.d/20-calendar.ini
    - /etc/php/7.3/cli/conf.d/20-ctype.ini
    - /etc/php/7.3/cli/conf.d/20-exif.ini
    - /etc/php/7.3/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.3/cli/conf.d/20-ftp.ini
    - /etc/php/7.3/cli/conf.d/20-gettext.ini
    - /etc/php/7.3/cli/conf.d/20-iconv.ini
    - /etc/php/7.3/cli/conf.d/20-json.ini
    - /etc/php/7.3/cli/conf.d/20-mbstring.ini
    - /etc/php/7.3/cli/conf.d/20-phar.ini
    - /etc/php/7.3/cli/conf.d/20-posix.ini
    - /etc/php/7.3/cli/conf.d/20-readline.ini
    - /etc/php/7.3/cli/conf.d/20-shmop.ini
    - /etc/php/7.3/cli/conf.d/20-sockets.ini
    - /etc/php/7.3/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.3/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.3/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.3/cli/conf.d/20-tokenizer.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
05 Jul
2 weeks ago

rameezisrar left a reply on Failing To Install Laravel Inside Homestead Box

@r123 change your homestead.yaml file to

---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: C:/Users/Me/web/laravel/test
      to: /home/vagrant/code

sites:
    - map: homestead.local
      to: /home/vagrant/code/test/public

databases:
    - homestead

and make sure you clone your project in home/vagrant/code/test/[your project files] not in the public folder for laravel projects

rameezisrar left a reply on Single Redis Configuration For Both Local And Production (cluster) Environments

@elijahpaul If you want to use both of them then Wherever you are storing them and fetching them you need to double check. Just follow above and you will be good to go

rameezisrar left a reply on Single Redis Configuration For Both Local And Production (cluster) Environments

@ you can fetch your redis data like this

$data = array_map('json_decode', Redis::zrevrange('key_name', 0, 10)); // get 10 records

rameezisrar left a reply on Single Redis Configuration For Both Local And Production (cluster) Environments

@elijahpaul Yes, you can use APP_ENV instead of APP_NAME.

Redis::zincrby('any_key_name_for_data',1, json_encode([
            'name' => config('app.name'),
            'title' => $thread->title,
            'path' => $thread->path()
        ]));

this code is just an key and value that I am using to store my data on my local and production redis array

rameezisrar left a reply on Combine Redis Local And Production (cluster) Config In Database.php

@elijahpaul user redis array should exactly be like above as I mentioned.

run

sudo composer dump-autoload

If you are storing the redis correctly with the app.name prefix, you won't be having any trouble

rameezisrar left a reply on Combine Redis Local And Production (cluster) Config In Database.php

@elijahpaul

In local .env, use the

APP_NAME=[localProjectName]

and iin your production .env use a different app name

APP_NAME=[ProjectName]

remove clusters from the database.php and it should me like

'redis' => [

        'client' => 'predis',

        'default' => [
            'host' => env('REDIS_HOST', '127.0.0.1'),
            'password' => env('REDIS_PASSWORD', null),
            'port' => env('REDIS_PORT', 6379),
            'database' => 0,
        ],

    ],

and now use Redis based on the app name

Redis::zincrby($this->cacheKey(),1, json_encode([
            'name' => config('app.name'),
            'title' => $thread->title,
            'path' => $thread->path()
        ]));

Now in this way you are storing the different data on local and production and with the same code :)

rameezisrar left a reply on Installation Request For Kylekatarnls/update-helper

The composer version I am using on VM Production is

`` Composer version @package_branch_alias_version@ (1.0.0-beta2) 2016-03-27 16:00:34

And on my local Homestead, it is 

Composer version 1.8.6 2019-06-11 15:03:05


@snapey I think I need to update composer itself to the latest stable version

rameezisrar left a reply on Installation Request For Kylekatarnls/update-helper

@snapey I want to install the composer dependencies locally not globally

rameezisrar left a reply on Combine Redis Local And Production (cluster) Config In Database.php

Why are you doing that? Local and Production redis data will, of course, will be different than the production ones

rameezisrar left a reply on Installation Request For Kylekatarnls/update-helper

@snapey No, I haven't tried this command

composer global self-update 

I have 3 more projects running on this single VM instance. Updating globally might cause conflict with other project's packages right?

rameezisrar left a reply on Installation Request For Kylekatarnls/update-helper

@snapey Yes I tried and then it goes to the idle state for inifity

rameezisrar started a new conversation Installation Request For Kylekatarnls/update-helper

When i try to run

composer install

I get this error

sudo composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for kylekatarnls/update-helper 1.1.1 -> satisfiable by kylekatarnls/update-helper[1.1.1].
    - kylekatarnls/update-helper 1.1.1 requires composer-plugin-api ^1.1.0 -> no matching package found.
  Problem 2
    - kylekatarnls/update-helper 1.1.1 requires composer-plugin-api ^1.1.0 -> no matching package found.
    - nesbot/carbon 1.39.0 requires kylekatarnls/update-helper ^1.1 -> satisfiable by kylekatarnls/update-helper[1.1.1].
    - Installation request for nesbot/carbon 1.39.0 -> satisfiable by nesbot/carbon[1.39.0].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

rameezisrar left a reply on My Closure Not Returning

Route::get('/', function () {

    $message = "it's working";

    $ResponseHandler = new ResponseHandler();

    $view = function () use ($message) {

        return view('welcome');
    };

    $json = function () use ($message) {

        $c = new ApiController();

        return $c->fetched(compact('message'));

    };

    return $ResponseHandler->response($view, $json);
});

04 Jul
2 weeks ago

rameezisrar left a reply on I Want To Remove User_id After Browser Is Closed

Fire an event when the user hits close tab and then through ajax or VUE's axio, call the Custom PHP class where the session will be deleted/removed

rameezisrar started a new conversation Unable To Set Up User Billing And Team Billing Together

I want my app to use User Billing along with Team Billing. But when I try something like that as per the documentation

 Spark::plan('Pro', 'monthly-pro')
        ->price(20)
        ->features([
            'Feature 1',
            'Feature 2',
            'Feature 3',
        ]);
     

        Spark::teamPlan('Basic', 'prod_FN84FC3do7z1eZ')
            ->price(50)
            ->maxTeamMembers(2)
            ->features([
                'First', 'Second', 'Third'
            ]);

Spark only acts upon User Billing and ignore the teamPlan. I want the user to pick either single or teams billing

rameezisrar left a reply on .ENV DEPLOYMENT FOR PRODUCTION SERVER

@kitman, of course, you don't add .env to git. You will create a .env file with cmd command and then will paste the code from your local .env and then update it according to the production settings.

01 Jul
2 weeks ago

rameezisrar left a reply on Call To A Member Function Sortable() On Array

Follow this link to use Eloquent Relationship : https://laravel.com/docs/5.8/eloquent-relationships

This is will your life alot easier

rameezisrar left a reply on Vue Component Not Rendering Images Correctly

Create a data and assign the props widget to the new created data i.e

 data() {
            return {
           
                widget: this.widget 
            }
        },

and then

<img :src="widget.embed" class="w-full trans cursor-pointer">

rameezisrar left a reply on Problem With Translation Of Query To Eloquent, Laravel 5.5

Why aren't you using the relationships?

rameezisrar left a reply on Class Config Does Not Exist In ....Illuminate\Container\Container.php:767

Reinstall it and follow instructions without changing config to Config

23 Jun
3 weeks ago

rameezisrar left a reply on Laravel Dusk Error With Default Tests

I reinstalled the dusk with chrome 75 updates and finally, it started working fine :)

22 Jun
3 weeks ago

rameezisrar left a reply on What Are Good WYSIWYG For Laravel?

Try Trix, you will like it.

Here is the link: https://github.com/basecamp/trix