rameezisrar

rameezisrar

Member Since 1 Year Ago

Experience Points
62,560
Total
Experience

2,440 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
500
Lessons
Completed
Best Reply Awards
10
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 13
62,560 XP
Nov
04
2 weeks ago
Activity icon

Replied to Hide An Element Of An Iframe From A Different Origin

thanks, @sinnbeck @tray2

For the cross-origin iframe src, getting the file contents and then rendering it to iframe works for me

Nov
03
2 weeks ago
Activity icon

Replied to Insert Image With Eloquent

as the doc says

you should first run this command

php artisan storage:link

after that in your controller's store method

$path = $request->file('file_input_name')->store('avatars'); // where avatars is the folder under yout public storage directory

Nov
02
2 weeks ago
Activity icon

Started a new Conversation Hide An Element Of An Iframe From A Different Origin

How can we hide an element of an iframe and that iframe source is from another origin

I have tried that

$("#myiframe").contents().find("#myContent").hide();

but that works only when the iframe source is of the same origin.

Any help would be much appreciated.

Oct
22
3 weeks ago
Activity icon

Replied to How To Pass Data With Vue Between Pages

You should go through these resources

https://dev.to/alexmourer/sharing-data-between-components-invuejs-48me
https://dev-notes.eu/2018/05/passing-data-between-vue-components/
Activity icon

Replied to Can't Access An Uploaded File (404)

@objectiveshark if you have file stored under the root/storage/app/public/[folder_name]/[file_name]

then it should be accessible as

asset('storage/images/'.$article->image)'

or

<img src="{{ url('storage/[folder_name]/'.$object->image) }}" alt="" title="" />

if you have file getting stored under the root/public/[folder_name]/[file_name] then it should be accessible as

http://yout.site.link/[folder_name]/[file_name]
Oct
15
1 month ago
Activity icon

Replied to Composer Command

This will clear the current compiled files, update the classes it needs and then write them back out so you don't have to do it again.

Activity icon

Replied to Composer Command

Basically, because Composer can't see the migration files you are creating, you are having to run the dump-autoload command which won't download anything new, but looks for all of the classes it needs to include again. It just regenerates the list of all classes that need to be included in the project (autoload_classmap.php), and this is why your migration is working after you run that command.

Activity icon

Replied to Data Format Issue In Mysql

@bhhussain try this

$('.date-picker').datepicker({
                format: 'yy/mm/dd',
                autoclose: true,
                todayHighlight: true
            });
Activity icon

Replied to Upload Image

@davy_yg make sure you have ran this artisan command at least once

php artisan storage:link

and then

if(Input::hasFile('slides'))
    {

 // make sure you have slides folder under/storage/app/public/
       $path = $request->file('slides')->store('slides');
    
\Log::info($path)
         Session::flash('flash', 'Successfully save data');
    }
Activity icon

Replied to How To Group 2 Attributes Under 1 Id (create)

@ain Yes that's correct

Just remove this line of code

<input type="hidden" name="restock_id" id="restock_id">

as on your controller 'restock_id' is equal to logged in user id. So no point of having this on blade.php file.

I hope this makes sense to you.

Oct
14
1 month ago
Activity icon

Replied to How To Group 2 Attributes Under 1 Id (create)

@ain

I think this is what you are looking for


$restock =  Restock::create(
            [
                'address' => $address,
                'phone_no' => $phone_no,
                'date' => $date,
                'total' => $total,
                'restock_user_id' => Auth::id(),
            ]
        );

 Unit::create(
            [
                'description' => $description,
                'quantity' => $quantity,
                'restock_id' => $restock->id,
            ]
        );

Oct
07
1 month ago
Activity icon

Replied to Testing

@davy_yg phpunit will be run all the test files under the test directory.

Sep
25
1 month ago
Activity icon

Replied to S3 File Manager

@daugaard47 If you have already started using AWS S3, then you have taken the good decision. Create buckets in AWS S3 and you are good to go.

Sep
24
1 month ago
Activity icon

Replied to Print Word Document Laravel

You are already getting the data from the database and then writing it to a document. You can print the data not from the document but from the database

Activity icon

Replied to Print Word Document Laravel

print the words from the Database source. You don't need to read from the file

Activity icon

Replied to How To Auto Redirect If Access Home '/' Route On Laravel

@adhik13th Well, ofcourse its going to take you to the home/default page when you open a browser tab. If you want to take the user to the admin_dashboard, then store the session value(lets say in LoginController) and then on AppServiceProvider.php try to get the session value. If the session value exist then you can redirect to admin_dashboard page

LoginCongtroller

 protected function authenticated(Request $request, $user)
{
    if ( $user->isAdmin() ) {// do your margic here
    // Specifying a default value...
        $value = session('key', 'default');
        return redirect()->route('admin_dashboard');
    }
    elseif ($user->isEmployee()) {
        return redirect()->route('pns_profile');
    }
    else{
        return redirect()->route('profile');
    }

AppServiceProvider

 public function boot()
    {
       
      if(session('key')){
        return redirect()->route('admin_dashboard');
    }
    
      
    }

Sep
16
2 months ago
Activity icon

Replied to Spark - Select All Users On A Specific Plan

@wiggonator try this

Auth::user()->current_billing_plan

Sep
03
2 months ago
Activity icon

Replied to Toggles

@sarahs74 If you are only passing a single value i.e the id then you can pass it as a query string to a get request as a wild card variable.

<button class="btn btn-sm btn-primary" name="own" a href="/books/action?action=own">Own It</button>

<button class="btn btn-sm btn-primary" name="wish" href="/books/action?action=wish">Wishlist</button>

IF you are passing more information, then you can use form for each button

Activity icon

Replied to Vue With Laravel

what is the output on your console? @gathuku

Aug
31
2 months ago
Activity icon

Replied to Informal Poll: Routes File

@snapey lol. thanks man for letting me know. I didn't saw the age of this poll :)

Activity icon

Replied to Validation In Laravel

@hayatomn

months later you won't be able to understand your this code

Activity icon

Replied to Why Phpunit Returns Null If Column Not Exist

@untymage

if (Schema::hasColumn('thread', 'DummyColumn'));
{
    dd('column exist');
}

Activity icon

Replied to Blocking Users

@ You can set a field in the user's table i.e block(boolean) or status(boolean) And the admin can change the status of any user.

Aug
30
2 months ago
Activity icon

Replied to Informal Poll: Routes File

Please keep the file

Aug
29
2 months ago
Activity icon

Replied to Cannot Create New Project In Homestead

@knot22

as the doc says

init.bat

Once you have cloned the Homestead repository, run the bash init.sh command from the Homestead directory to create the Homestead.yaml configuration file. The Homestead.yaml file will be placed in the Homestead directory:

Aug
28
2 months ago
Activity icon

Replied to Validation In Laravel

@hayatomn you are complicating things

What you should do is add two select boxes(one for hours and other is for minutes) with options fields.

and then on your controller/logic validate this

$validatedData = $request->validate([
        'hours' => 'required',
        'minutes' => 'required',
    ]);

Activity icon

Replied to Can Not Load File App.css

@trandung can you show your code?

Aug
27
2 months ago
Activity icon

Replied to Can Not Load File App.css

@trandung How are you loading/including the file?

Activity icon

Replied to Cannot Create New Project In Homestead

@knot22 the code directory should not be in Homestead directory. It could be anywhere i.e in the Documents folder or anywhere

folders:
    - map: ~/code
      to: /home/documents/code

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

make sure you run this command while you are in the Homestead directory

init.bat
Activity icon

Replied to Access-Control-Allow-Origin On Storage For Get Method For Files

@ You need to create a symbolic link via running the command

php artisan storage:link

as per the laravel documentation

The public disk is intended for files that are going to be publicly accessible. By default, the public disk uses the local driver and stores these files in storage/app/public. To make them accessible from the web, you should create a symbolic link from public/storage to storage/app/public. This convention will keep your publicly accessible files in one directory that can be easily shared across deployments when using zero down-time deployment systems like Envoyer.

Aug
26
2 months ago
Activity icon

Replied to Laravel To Mobile Application

@prospeak Follow this link to create your api's. https://lumen.laravel.com/

And then call your APIs from the mobile app framework.

With each registered user either through an app or a web app, a token will be generated and of course you need to use that token when calling the apis

Activity icon

Replied to Is There A Way To Hold The Data First Before Storing Them To Database?

@chron

For this sort of scenario, I will be using Redis to store the information before inserting into the database

Activity icon

Replied to Access-Control-Allow-Origin On Storage For Get Method For Files

@secretsseeker You haven't added CORS on the server-side.

Follow this article and you will be good to go

https://medium.com/@petehouston/allow-cors-in-laravel-2b574c51d0c1

Aug
25
2 months ago
Activity icon

Replied to Laravel To Mobile Application

@prospeak As you said you can create a mobile application in ionic or with any other framework. If you have set up the API with token protected and call these services from your mobile app

Aug
21
2 months ago
Activity icon

Replied to Remove From Session

@david001 1) After removing the product from the session you need to get a fresh copy of session products to re-render them.

  1. Or you get the session products and store that in the data. Add/remove the products on the user product action and later send the axios post request with the data
Aug
20
2 months ago
Activity icon

Replied to What Is The Best Way To Manage An Unregistered Visitor Rating System? Token? IP?

@romainb Keep it simple. Store rating based on IP Address only

Activity icon

Replied to Mixed Content: The Content Must Be Served Over Https

@cronix

 axios.post('//sitename/api/training/section/submit', {
                    fields: this.fields,
                    product: this.product,
                    quiz: this.quiz
                })
Aug
19
2 months ago
Activity icon

Replied to Mixed Content: The Content Must Be Served Over Https

@cronix I have tried that too with https on axios.post but I am still getting the same error

Activity icon

Replied to What Is The Best Way To Manage An Unregistered Visitor Rating System? Token? IP?

@romainb Token is associated with a registered user. For your current scenario, storing the IP Address will do the trick.

Activity icon

Started a new Conversation Mixed Content: The Content Must Be Served Over Https

error

Mixed Content: The page at 'https://site/home#/training/17/100' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://site/api/training/section/submit'. This request has been blocked; the content must be served over HTTPS.

AppServiceProvider

use Illuminate\Support\Facades\URL;

class AppServiceProvider extends ServiceProvider
{
    
    public function boot()
    {
       
        if (App::environment('production', 'local'))
        { 
           
       
            URL::forceScheme('https');
          
        }   

        // make forumChannels available with every view
        view()->share('channels', Channels::get());
    }

and I am posting from the vue form

submit() {
                this.errors = {};
                axios.post('/api/training/section/submit/', {
                    fields: this.fields,
                    product: this.product,
                    quiz: this.quiz
                })

though this code working fine perfectly on my local but through a mixed content https error on Production

Aug
07
3 months ago
Activity icon

Replied to Modifying Spark's Login To Use Username Instead Of Email

@clat23 I am supposing that you are having a username field under the Users table

your User.php

protected $fillable = ['name', 'email', 'password', 'username'];

Secondly change the input type field from 'email' to 'text' from the login.blade.php

<input id="email" type="text" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" required autofocus>

your LoginController

protected function credentials(Request $request)
    {
        $field = $this->field($request);

        return [
            $field => $request->get($this->username()),
            'password' => $request->get('password'),
        ];
    }

public function field(Request $request)
    {
        $email = $this->username();

        return filter_var($request->get($email), FILTER_VALIDATE_EMAIL) ? $email : 'username';
    }


protected function validateLogin(Request $request)
    {
        $field = $this->field($request);

        $messages = ["{$this->username()}.exists" => 'The account you are trying to login is not registered or it has been disabled.'];

        $this->validate($request, [
            $this->username() => "required|exists:users,{$field}",
            'password' => 'required',
        ], $messages);
    }


Aug
06
3 months ago
Activity icon

Replied to Checking For Null Values In A User Object

@elo

@if($user->sex)
    not null
@endif

equals to

if($user->sex){
    not null
}
Aug
05
3 months ago
Activity icon

Replied to Vue Emit From Slot To Parent

Attach a function that will do the work

<div v-if="showModal" @close="close">
    <slot></slot>
</div>

  methods: {
       
 
            close() {
                this.showModal = 'false
            }
        }
Activity icon

Replied to Vue Emit From Slot To Parent

@dawgonking

try this

   this.$root.$emit('close')

or

this.$emit('close')

or

this.$parent.$emit('close')
Activity icon

Replied to Laravel And Vuetify

@yibr After running

npm install vue-router
npm install vuetify

Update your app.js something like that

import Vue from 'vue';
import VueRouter from 'vue-router';
import routes from './routes';
import Vuetify from 'vuetify';

import axios from 'axios';

window.axios = axios;

window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';


Vue.use(VueRouter);

let app = new Vue({
    el: '#app',

    router: new VueRouter(routes)
});


Vue.use(Vuetify, {
    theme: {
        primary: "#1464bf",
      }
})
Activity icon

Replied to Where Is Put Service Code In Laravel Project?

@kakallatt You can create a different Service Provider for this purpose i.e GoogleClientServiceProvider. Under this file you can bind the implementation.

Aug
04
3 months ago
Activity icon

Replied to How To Check If Field Was Selected In API Resources?

@ranx99 try this

Post::where('id',  $id)->select('id', 'title',  'subtitle')->firstOrFail();
Activity icon

Replied to Browser Not Showing The Change After Updating User.vue File

@khosmoe_2019 Make sure you add the 'app' id on the parent

<div id="app">
    <main class="py-4">
        <div class="container">
    <router-view></router-view>
        </div>
    </main>
</div>