doncho85

Member Since 8 Months Ago

Experience Points
2,150
Total
Experience

2,850 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
5
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.

  • Community Pillar

    Earned once your experience points ranks in the top 10 of all Laracasts users.

Level 1
2,150 XP
Apr
16
1 day ago
Activity icon

Replied to Laravel Package For Breadcrumbs

HI both,

thanks for your quick response.

I try to use the diglactic but there is a small issue. I dont know why for some reason the current page name is coming with "-" after the name and I can't find the way to get rid of it.

Activity icon

Started a new Conversation Laravel Package For Breadcrumbs

Hi guys,

Can anyone recommend a supported package for breadcrumbs in laravel?

Thank you very much in advance.

Apr
15
2 days ago
Activity icon

Replied to Setting Up Laravel For An Existing Project

the first think you need to do is clone the project on your computer

Apr
14
3 days ago
Activity icon

Replied to How To Get The Most Recent Data

grab the latest message and then use the relation when you are showing the data

Activity icon

Replied to Laravel Not Logging A User In

i can't see our web.php

Apr
13
4 days ago
Activity icon

Replied to Mature CMS For Laravel

Try Laravel Voyager

Activity icon

Replied to Create Admin With Voyager (Laravel 6)

yes this user should be there by default why u are trying to recreate the default user ?

Activity icon

Replied to Create Admin With Voyager (Laravel 6)

can i see the error pls?

Apr
12
5 days ago
Activity icon

Replied to Redirect To The Same Page To An Section ID

working!!!! thanks

Activity icon

Replied to Redirect To The Same Page To An Section ID

im not really understanding

Activity icon

Started a new Conversation Redirect To The Same Page To An Section ID

HI guys I am trying to redirect to the section of the page after validation errors but for some reason its not working

This is my code:

<section id="contact" class="p-5 bg-light">
    <div class="container-fluid">
            <!---title start-->
            <div class="row">
                <div class="col text-center mb-3">
                    <h1 class="text-warning display-2">Contact us</h1>
                   
                </div>
             </div>
            <!---title end-->
            <div class="row justify-content-center">
                <div class="col-lg-6 col-md-8 col-sm-10">
                    <div class="text-center text-secondary">
                        <h2>Got Question?</h2>
                        <p>Stay Connected</p>
                    </div>
                    @if(Session::has('success'))
                    <div class="alert alert-success">
                    {{ Session::get('success') }}
                   </div>
                    @endif
                    <form class="text-muted" method="POST" action="{{route('contact.store')}}"> @csrf
                        <div class="form-group" {{ $errors->has('name') ? 'has-error' : '' }}>
                            <label for="name">Name</label>
                            <input type="text" name="name" class="form-control" id="name"> 
                            <span class="text-danger">{{ $errors->first('name') }}</span>
                        </div>
                        <div class="form-group" {{ $errors->has('email') ? 'has-error' : '' }}>
                            <label for="email">Email</label>
                            <input type="email" name="email" class="form-control" id="email">
                            <span class="text-danger">{{ $errors->first('name') }}</span> 
                        </div>
                        <div class="form-group" {{ $errors->has('message') ? 'has-error' : '' }}>
                            <label for="message">Message</label>
                            <textarea class="form-control" name="message" id="message" rows="3">

                            </textarea>
                        </div>
                    <button class="btn btn-warning btn-block" type="submit">Submit Question</button> 
                    </form>
                </div>
            </div>

    </div>


</section>


 public function contactPost(Request $request)
    {
       $validator =  $this->validate($request,[
            'name' => 'required',
            'email' => 'required|email',
            'message' => 'required'
        ]);
        if ($validator->fails()) {
            return redirect()->to(app('url')->previous()."#contact")->withErrors($validator)->withInput();
        }
        


     
      

    }



Any help will be appreciated. Thank you very much in advance

Apr
08
1 week ago
Activity icon

Replied to Nuxtjs Inside Laravel App

thanks

Activity icon

Replied to Nuxtjs Inside Laravel App

HI , thanks for your response,

So basically when i install this i have laravel app with nuxt inside am i right ?

Activity icon

Started a new Conversation Nuxtjs Inside Laravel App

Hi everyone,

Does anyone has experience with installing NUXT inside laravel app instead of creating a separate NUXT front-end app?

Thank you very much

Activity icon

Replied to How I Can Stream Pdf Files Instead Of Downloading In Laravel?

why not open them in new tab and then print

Activity icon

Replied to Bootstrap Carousel Horizontal Gray Bar On The Bottom

the active class was causing the issue. I remove the background and also I put container-fluid and its all good now. Thanks

Apr
07
1 week ago
Activity icon

Replied to How To Add Custom Menu In Voyager Laravel?

what if we want to display also sub-menu

Activity icon

Replied to Voyager Menu Is Not Taking Bootstrap Styles

the menu is coming below this list which is strange

Activity icon

Started a new Conversation Voyager Menu Is Not Taking Bootstrap Styles

Hi everyone,

I am trying to show the voyager menu in my header but for some reason is not taking the bootstrap styles.

this is my code:


 <ul class="navbar-nav">
      <li class="nav-item"><a class="nav-link text-light text-uppercase font-weight-bold px-3">{{menu('main-menu','bootstrap')}}</a></li>

      
       
    </ul>




Any help will be appreciated.

Apr
06
1 week ago
Activity icon

Replied to Bootstrap Carousel Horizontal Gray Bar On The Bottom

i remove the the background for the class .active and gray part gone but now i have a small line below every slide and i dont know from where this line is coming

Activity icon

Replied to Models Vs Controllers

Basically the Model is representing your table from the database and with controller you are making actions to get the data from the Model.

//method in the controller
public function index() {

User::all();

return view('home');


//User is your model


}



Activity icon

Replied to Models Vs Controllers

Model is representing you database tables. You are defining in the models which fields to be used and staff like that. Controllers are actions.

lets say you have route::post(/user ,[email protected] ); You should create controller and define the method index inside which will look like

public function index(){

//add the code here }

Activity icon

Started a new Conversation Bootstrap Carousel Horizontal Gray Bar On The Bottom

Hi guys,

I am just trying to customize bootstrap carousel but for some reason i have horizontal gray bar on the bottom below every picture and I can't get rid of it. This is my code:

     <!----carousel-->
      <section class= "bg-dark rounded ">
      
      
          <div class="container mt-2 bg-warning ">
        <div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel">
          <ol class="carousel-indicators">
            <li data-target="#carouselExampleCaptions" data-slide-to="0" class="active"></li>
            <li data-target="#carouselExampleCaptions" data-slide-to="1"></li>
            <li data-target="#carouselExampleCaptions" data-slide-to="2"></li>
          </ol>
          <div class="carousel-inner">
            <div class="carousel-item active">
              <img src="images/1.jpg" class="d-block w-100" alt="...">
              <div class="carousel-caption d-none d-md-block  title-bg">
                <h5>News 1</h5>
                <p>Title goes here...</p>
              </div>
            </div>
            <div class="carousel-item">
              <img src="images/2.jpg" class="d-block w-100" alt="...">
              <div class="carousel-caption d-none d-md-block title-bg">
                <h5>News 2 </h5>
                <p>Title goes here...</p>
              </div>
            </div>
            <div class="carousel-item">
              <img src="images/3.jpg" class="d-block w-100" alt="...">
              <div class="carousel-caption d-none d-md-block title-bg shadow-sm ">
                <h5>News 3</h5>
                <p>Title goes here....</p>
              </div>
            </div>
          </div>
          <a class="carousel-control-prev" href="#carouselExampleCaptions" role="button" data-slide="prev">
            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
            <span class="sr-only">Previous</span>
          </a>
          <a class="carousel-control-next" href="#carouselExampleCaptions" role="button" data-slide="next">
            <span class="carousel-control-next-icon" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
          </a>
        </div>
      </div> 
      </section>





Any help will be appreciated. Thank you very much in advance

Activity icon

Replied to Images URL Not Working

try Storage::url()

Apr
05
1 week ago
Activity icon

Started a new Conversation Nuxt Auth - LoggedIn:false And User:null

Hi all im using nuxt js for the front end and laravel for the backend and im trying to implement authentication with nuxt auth. I can successfully log in and im receiving the data and jwt token however when i check the vue console my loggedIn is false and my user object is null.

This i my code:

login.vue

<template>
<div class="container col-md-6 mt-5">
    <h2>Login</h2>
    <br>
    <form @submit.prevent="submit">
  <div class="mb-3">
    <label  class="form-label">Email address</label>
    <input v-model.trim="form.email" type="email" class="form-control" autofocus>
    <small  class="form-text text-danger">We'll never share your email with anyone else.</small>
  </div>
  <div class="mb-3">
    <label  class="form-label">Password</label>
    <input type="password" v-model.trim="form.password" class="form-control" >
     <small  class="form-text text-danger">We'll never share your email with anyone else.</small>
  </div>
 
  <button type="submit" class="btn btn-primary">Login</button>
</form>
<br>
<p>Don't have account <nuxt-link to="/register">Register</nuxt-link> </p>
</div>
</template>
<script>
export default {
  data(){
    return {
      form: {
        email:'',
        password:'',
      }
    }
  },
methods: {
		submit() {
			this.$auth
				.loginWith('local', {
					data: {
						email: this.form.email,
						password: this.form.password
					}
				})
				.then(data => {
					console.log(data);
					this.$router.push("/");
				})
				.catch(err => {
					console.log(err);
				});
		}
	}
}
</script>


nuxt.config.js

export default {
  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: 'frontend-nuxt',
    htmlAttrs: {
      lang: 'en'
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
      {
        rel: "stylesheet",
        href:
          "https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
      }
    ],
    script: [
      {
        src: "https://code.jquery.com/jquery-3.3.1.slim.min.js",
        type: "text/javascript"
      },
      {
        src:
          "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js",
        type: "text/javascript"
      },
      {
        src:
          "https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js",
        type: "text/javascript"
      }
    ]
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [
  ],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    // https://go.nuxtjs.dev/axios
    '@nuxtjs/axios',
    '@nuxtjs/auth-next'
  ],

  // Axios module configuration: https://go.nuxtjs.dev/config-axios
  axios: {

    baseUrl:"http://127.0.0.1:8000/api"
  },
  auth: {
    strategies: {
      local: {
        endpoints: {
          login: {
            url: "login",
            method: "post",
            propertyName: "meta.token"
          },
          user: {
            url: "user",
            method: "get",
            propertyName: "data"
          },
          logout: {
            url: "logout",
            method: "post"
          }
        }
      }
    }
  },

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
  }
}








Any help will be much appreciated

Apr
01
2 weeks ago
Activity icon

Replied to Laravel Deployed Application Not Secured Using Certbot

What about sites-enabled ? do you have configuration file there ?

Mar
31
2 weeks ago
Activity icon

Started a new Conversation Trying To Get Property 'body' Of Non-object - Laravel And Voyager

I am trying to get the data from the Pages table from Voyager and show in my view on the front and I am hardcoding the id like its shown on my code below:

Route::get('/about', function() {
$id = 2;
$page1 = App\Page::where('id','=', $id)->first();
return view('pages.about',compact('page1'));
});

When I am selecting with App\Page::all() everything is working fine im getting the data and showing on the front. But when i put WHERE im getting the error below:

Trying to get property 'body' of non-object

This is my view


  @foreach($page1 as $page)


  {!!$page->body!!}}





  @endforeach

Any help will be appreciated. Thank you very much in advance.

Activity icon

Awarded Best Reply on Showing A Link To Pdf File On The Front Laravel + Voyager

yes i did,

actualy this code resolve my issue

 href="{{Storage::url((json_decode($policy->file_path))[0]->download_link)}}"

Activity icon

Replied to Showing A Link To Pdf File On The Front Laravel + Voyager

yes i did,

actualy this code resolve my issue

 href="{{Storage::url((json_decode($policy->file_path))[0]->download_link)}}"

Activity icon

Started a new Conversation Showing A Link To Pdf File On The Front Laravel + Voyager

Hi there,

I am trying to set the link in my Policies blade to a pdf files that I uploaded from Laravel Voyager admin panel.

this is my blade file:

  @foreach($policies as $policy)
                      <h5 class="text-warning ml-4  ">{{$policy->name}}</h1>
                      <a target="_blank" rel="noopener noreferrer" href="{{ Storage::url($policy->download_link)}}"   class="mr-4 btn btn-sm btn-warning"><i class="fas  fa-cloud-download-alt"></i></a>
                    </div>
                    @endforeach

This is what i have in my database

[{"download_link":"policies\March2021\9Vmeb0X2KFcY0Vof4zpn.pdf","original_name":"Academic-Freedom-and-Freedom-of-Speech-Policy.pdf"}]

When i click on the button to see the file i have this 404

The requested resource /storage/ was not found on this server.

Any help will be appreciated

Mar
27
3 weeks ago
Activity icon

Replied to Laravel NGINX - File Not Found

working like a charm!!! Thanks

Activity icon

Started a new Conversation Laravel NGINX - File Not Found

Hi all,

I am trying to deploy a laravel app on digital ocean but I am facing the error File Not Found.

This is my configuration file:

server {
listen 80;
server_name borisov.club;
root /home/api/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
index index.html index.htm index.php;
charset utf-8;
location / {

try_files $uri $uri/ /index.php?$query_string;
}
# Serve static files directly
location ~* ^/storage/(.*)\.(jpg|jpeg|gif|bmp|png|ico)$ {
access_log off;
}
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
$realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}

Any help will be much appreciated.

Thank you very much in advance

Mar
07
1 month ago
Activity icon

Started a new Conversation Registering Global Components In NUXT Js

Hi everyone,

I'am trying to register global components in NUXT js and Laravel project. I am creating a index.js in my components folder under the sub-folder _global with the following code:

index.js

import Vue from 'vue';
import upperFirst from 'lodash/upperFirst';
import camelCase from 'lodash/camelCase';
import { __esModule } from 'vform';

// require all components in the current directory and subdirectories
const requireComponent = require.context('.', true, /_base-[\w-]+\.vue$/);

requireComponent.keys().forEach(fileName => {
  // get the component's configuration
  const componentConfig = requireComponent(fileName);

  const fn = fileName
    .split('/')
    .pop()
    .replace(/\.\w+$/, '');

  const componentName = upperFirst(camelCase(fn));

  Vue.component(componentName, componentConfig.default || componentConfig);
});


then im registering this file in my nuxt.config.js

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
    '~plugins/vform',
    '~components/_global',
    
  ],

and for some reason I am getting this error

  3 | const components = {
> 4 |   : () => import('../../components/_global/index.js' /* webpackChunkName: "components/" */).then(c => c.default || c)
    |   ^
  5 | }
  6 |
  7 | for (const name in components) {

Any help will be much appreciated. Thank you very much in advance !

Jan
14
3 months ago
Activity icon

Started a new Conversation Infyom Laravel Generator Error

Hi there ,

Im using laravel generator and Im following the instructions from the documentation and im facing the following error when i try to login

Route [home] not defined. (View: /Users/donchoborisov/Documents/laravel-qrcode-admin/resources/views/layouts/sidebar.blade.php) (View: /Users/donchoborisov/Documents/laravel-qrcode-admin/resources/views/layouts/sidebar.blade.php) (View: /Users/donchoborisov/Documents/laravel-qrcode-admin/resources/views/layouts/sidebar.blade.php)



Any help will be appreciated.

Nov
18
4 months ago
Activity icon

Replied to Point Field In Mysql

   protected $fillable = [
        'name', 'email', 'password','tagline','about','username','available_to_hire','formatted_address'
    ];

    protected $spatialFields = [
        'location',
        
    ];

Activity icon

Replied to Permission Denied For A .sh Script In Docker

bash doesnt make any difference

Activity icon

Replied to Point Field In Mysql

Hi there,

Yes I've tried but there is no difference

Activity icon

Started a new Conversation Point Field In Mysql

Hi there I am using Laravel and i define a POINT field for lognitude and latitude I am using a package grimzy/laravel-mysql-spatial package but when i update the field is giving me 'null'

this is my controller

 public function updateProfile(Request $request)
    {
        $user = auth()->user();

        $this->validate($request,[
            'tagline'=>['required'],
            'name'=>['required'],
            'about'=>['required','string','min:20'],
            'formatted_address' => ['required'],
            'location.latitude' => ['required','numeric','min:-90','max:90'],
            'location.longitude' => ['required','numeric','min:-180','max:180'],
          ]);

          $location = new Point($request->location['latitude'],$request->location['longitude']);
          $user->update([
              'name' => $request->name,
              'formatted_address' => $request->formatted_address,
              'location' => $location,
              'available_to_hire' => $request->available_to_hire,
              'about' => $request->about,
              'tagline' => $request->tagline,

          ]);

          return new UserResource($user);

    }

Can you please help me ?

Activity icon

Replied to Permission Denied For A .sh Script In Docker

Yes it is a bash script I will try and let you know

Activity icon

Started a new Conversation Permission Denied For A .sh Script In Docker

Hi Everyone,

I am working on MAC OS and I am trying to run a script from my app container but I am ending up with persmission denied after I run compose-build up.


This is is the line :
CMD ./start_script.sh

If anyone can give me any help regrading this I very thankfull.

Thank you very much in advance.

Oct
24
5 months ago
Activity icon

Started a new Conversation Docker Build Error

This is my docker file and im trying to build the container with this command

docker build -t myphpcontainerwithmysqli . and I am facing this error

Invalid signal: SIGWINCH

dockerfile

FROM php:7.3-apache
RUN docker-php-ext-install mysqli
COPY index.php /var/www/html/
Oct
23
5 months ago
Activity icon

Replied to What Is The Best Package For Shopping Cart?

Hi there,

Check this package its very easy to use and have good documentation

https://packagist.org/packages/bumbummen99/shoppingcart