KNietzsche

Web Artisan at Colmar

Experience

43,030

8 Best Reply Awards

  • Member Since 5 Months Ago
  • 361 Lessons Completed
  • 113 Favorites

18th August, 2017

KNietzsche left a reply on Join Two Tables • 5 days ago

simply create a hasMany (ex: in your Address model) and belongsTo (ex: in your LinkedAddress model) (or change to the corresponding relationship according to your case) use Eloquent with query builder to retrieve the data with your additional condition (code != 5). There are several examples in Jeff's videos Also check Laravel relations.

15th August, 2017

KNietzsche left a reply on How To Add Font-awesome To Laravel-Mix • 1 week ago

@frizbee simply remove the right parenthesis at the end of the url ) in the browser and you can access to the post.

13th August, 2017

KNietzsche left a reply on How To Get Privious Image In Choose File In Update Function? • 1 week ago

  1. check if your image file exists in the folder where it should be
  2. check the url of your image when you try to show it (and correct the filename if necessary) or You could use [acessors](// https://laravel.com/docs/5.4/eloquent-mutators#accessors-and-mutators) to update automatically the filename

KNietzsche left a reply on UML Class Diagram For Laravel Project • 1 week ago

As this subject could be interesting, I continued to search...there are several existing projects indeed.... Check packagist and project like umlwriter

11th August, 2017

KNietzsche started a new conversation Anybody Using Hugo ? • 1 week ago

Just discovered about Hugo and wondering if we could use it within a laravel project and/or bulma as I saw this combination (hugo/bulma) in a post on the net.

KNietzsche left a reply on How To Use API • 1 week ago

I think simply fill the routes/api.php (you should have an example out of the box when you create a laravel project using the auth:api middleware) instead of the routes/web.php and call it like another route.

KNietzsche left a reply on UML Class Diagram For Laravel Project • 1 week ago

Why don't you write your own using Route::getRoutes() to extract routes, then something like get_class_methods to extract methods then a js chart library like jsUML2 Editor to produce the diagram ? And then, you could even share to the community with a github repository !

8th August, 2017

KNietzsche left a reply on Hosting 2 Separate Laravel Instances On 1 Server • 2 weeks ago

I did it recently check subdirectories as virtualhost in Centos 7 Answer is inside !

KNietzsche left a reply on Hosting 2 Separate Laravel Instances On 1 Server • 2 weeks ago

I did it recently check subdirectories as virtualhost in Centos 7 Answer is inside !

6th August, 2017

KNietzsche left a reply on Subdirectories As Virtualhost In Centos 7 • 2 weeks ago

ok...this below is running pretty well, accessing from x.mydomain.com or y.mydomain.com

Alias /system /var/www/html/system/public/
Alias /test/var/www/html/test/public/

<VirtualHost *:80>
   ServerName x.mydomain.com
   DocumentRoot /var/www/html/system/public
  <Directory "/var/www/html/system/public/">
     Require all granted
     AllowOverride all
  </Directory>
</VirtualHost>


Alias /test /var/www/html/test/public/
<VirtualHost *:80>
   ServerName y.mydomain.com
   DocumentRoot /var/www/html/test/public
  <Directory "/var/www/html/test/public/">
     Require all granted
     AllowOverride all
  </Directory>
</VirtualHost>

but I would like to know why I can access for example to x.mydomain.com/phpmyadmin/ or y.mydomain.com/phpmyadmin/ or www.mydomain.com/phpmyadmin/ and not with my laravel projects in directories ....why and/or how to access www.mydomain.com/test www.mydomain.com/system and www.mydomain.com/phpmyadmin

For the moment I will keep @CodebyRay 's idea (thks)...but I will continue to work on the topic to try to manage my cases, so if you have idea or links...I would appreciate

5th August, 2017

KNietzsche left a reply on Subdirectories As Virtualhost In Centos 7 • 2 weeks ago

Tx already for your answer.... First part of your answer...I can only see the content of both directories...using /public... but I would like to see the rendering and without the /public extension

Does that mean that we cannot do the same with a VPS we do in local mode ? With my local server on Windows 10 I have multiple directories and can access each one from same root address like localhost/project1 or localhost/project2... Seems curious to me, I will continue to investigate as well, but I agree that your solution with 2 subdomains could be ok. Hope some other people will share their opinion as well.

KNietzsche started a new conversation Subdirectories As Virtualhost In Centos 7 • 2 weeks ago

in /var/www/html/ I have 2 subdirectories system and test each one with a laravel project

I have created 2 conf files

One file /etc/httpd/conf.d/test.conf

<VirtualHost *:80>
  ServerName x.mydomain.com
  Alias /test /var/www/html/test/public
  DocumentRoot /var/www/html/
  <Directory "/var/www/html/test/public">
    AllowOverride all
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

and 1 file /etc/httpd/conf.d/system.conf

<VirtualHost *:80>
  ServerName x.mydomain.com
  Alias /system /var/www/html/system/public
  DocumentRoot /var/www/html/
  <Directory "/var/www/html/system/public">
    AllowOverride all
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

I can access http://x.mydomain.com/system and all is ok...but not http://x.mydomain.com/test

Here is the .htaccess from /var/www/html/test/public

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        #Options -MultiViews
        Options +FollowSymLinks
    </IfModule>

    RewriteEngine On
    RewriteBase /test/

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteRule ^ index.php [L]
    RewriteRule ^(.*)$ index.php/$1 [L]

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>

same for system but with RewriteBase /system/

Do you have an idea to help me to find what's wrong and to solve the issue ? What am I doing wrong ? thanks

3rd August, 2017

KNietzsche left a reply on Creating Facebook Like Notifications • 2 weeks ago

Search for broadcasting and pusher videos like pusher-awesomeness or socket-io or broadcasting-events Well explained, and that should help.

KNietzsche left a reply on Laravel With Javascript Framework • 2 weeks ago

Vus is just awesome...you can easily start with basic components and go later on more complex stuff...easy to learn, and impressive...it's hard to reuse jquery or something else once you know a little vue...unless you need SEO, for a business homepage...because tags will not match google html structure..(maybe with Nuxt..have not tried this) etc... But for other applications, it's just great...at least for me !!

30th July, 2017

KNietzsche left a reply on Chat With Vue And Laravel • 3 weeks ago

damm seems you need to start Jeff's serie on VueJs ! Because what you ask is a complete course as you're asking for basics ! Start to enable VueJs in your form and bind some data to a method, with some events prevented from default actions. In that method, you can send data with axios to the user provided from a parameter (example: user id) ! I have no time to write a complete example, but there are tons in youtube, here or in other places like udemy ! Just take time to watch them and to practice slowly...don't jump over steps, start from A and finish to Z !

26th July, 2017

KNietzsche left a reply on Npm Or Link , Including For Css Or/and Js • 3 weeks ago

npm will help you to merge/build the final compacted files (css and/or js) from your original files that you will link for production but if you want to test, you can use link to the cdn of course, before to build the final version with npm npm is a tool that will generate the file to link in your page in dev (for debug...) or production mode. With npm, your file is locally based, so faster to upload as well.

KNietzsche left a reply on [5.4] Polymorph To Polymorph Relations • 3 weeks ago

that's a question for which I would like to get an answer as well.

25th July, 2017

KNietzsche left a reply on Creating A Websocket System Without Pusher Or Nodejs? • 4 weeks ago

You can watch some tuto on youtube about how to install or use ratchet with Laravel... some are russians but videos with code are easily understandable. And if you use a VPS, you should be able to install it easily and then use it with our favorite framework.I must agree that in some cases, VPS seems to be the best choice for some applications with Laravel...but that's another topic...

24th July, 2017

KNietzsche left a reply on Access A JQuery Variable Within A Vue.js Component • 4 weeks ago

Is there any reason to keep jquery in this case where you want to call a component which displays already a modal...a prop, a bus, a store, a parameter...there are so many ways to pass the data to a component... I don't really understand your problem indeed...is something missing in your description ?

KNietzsche left a reply on Access A JQuery Variable Within A Vue.js Component • 4 weeks ago

Is it not possible to call directly your modal adding the @click event ?

<button ...
v-on:click="yourMethod( your_variable_id )"...

and then in your component something like that

methods: {
 yourMethod: function(your_id) {...

KNietzsche left a reply on Realtime Content Update • 4 weeks ago

Maybe Ratchet as well if you have a VPS, could be interesting, a thing I'm looking at ...Socketome:ratcher

KNietzsche started a new conversation CENTOS 7 VPS : Problem To Install Mariadb.. • 4 weeks ago

I try to configure a CentOs 7 vps, for the first time. Every thing worked fine...(webmin, laravel, httpd, xming after a lot of efforts, etc lol) except phpmyadmin and mariadb. I have directly upgraded php to version 7.1 before I have installed mariadb and phpmyadmin but got a lot of messages about compatibility... Could that be a reason of my problems ? Do you first install php phpmyadmin and mariadb before you upgrade php to another version ? If you have some experience to share, that would be great !

KNietzsche left a reply on No Email Sent When User Resets Password • 4 weeks ago

Have you checked your .env file and filled with your params ?

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

here what I did to test my config, there are of course different ways to check

create a route in web.php

Route::get('/sendmail',[email protected]')->name('sendMail');

create a mail.blade.php in views

test mail from Laravel

create a controller EmailController.php

<?php 
namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Mail;

class EmailController extends Controller
{
    public function send() {
     
        Mail::send(['text' => 'mail'], ['name', 'yourname'], function($message){
            $message->to([email protected]', 'to user')->subject('email');
            $message->from([email protected]', 'from NGCRM');
        });
        dd('email sent');
    }
}

KNietzsche left a reply on Combining Of Exam Results • 4 weeks ago

not readable !

21st July, 2017

KNietzsche left a reply on Laravel Dropdown With Edit Functionality • 1 month ago

I believe he's thinking on select2 like stuff..bootstrap-select2 or create a component with VueJs...Otherwise google or youtube with 'select2' word if you prefer Jquery

19th July, 2017

KNietzsche left a reply on Working With PHP In VUE • 1 month ago

the last I created yesterday and works like a charm, was something like in web.php

Route::get('/search', function()...

and in my vue something like that

axios.get('search?q='+this.asearch)
            .then

Hope that helps

17th July, 2017

KNietzsche left a reply on TinkerCommand::handle() Does Not Exist • 1 month ago

@Sn00ch I got the same problem, and your solution seems to work for now. Thanks.

12th July, 2017

KNietzsche left a reply on Table Already Exist • 1 month ago

Maybe check in your migration that you use the create and not the table

 public function up()
    {
        Schema::**create**('yourtable', function (Blueprint $table) {

public function down()
    {
        Schema::dropIfExists('yourtable');
    }

meaning you have created the migration with

php artisan make:migration create_your_table --table="yourtable"

instead of

php artisan make:migration create_your_table --create="yourtable"

if you have table ...just rollback and change the word to create and migrate

10th July, 2017

KNietzsche left a reply on Polymorphic Relations • 1 month ago

I believe your ads table has only 1 part of the links.... For example with post / video ...and comment.... you have the table type / id like you did...but also the comment associated with the video/post This id seems to be missing in your schema

Have a look at this Help Me Understand When to Use Polymorphic Relations

26th June, 2017

KNietzsche left a reply on Laravel Training • 1 month ago

I like the way Jeff is sharing with us...if you don't understand him...then there is a problem ! people who play poker always say....if in 5 minutes at a table you cannot see who is the pigeon...then maybe ...it's because it's you ! so...good luck

KNietzsche left a reply on Laravel Training • 1 month ago

You're watching 3 videos... I have watched 284 in less than 3 months, and still rewatching and rewatching old episodes...and watching practical cases on Youtube and practicing with small tests projects... I have now a global idea of what can be done, and advantages to use Laravel, and I enjoy every day I code, even if I'm not as good now as I wanted to be...but Laracasts community is great and Jeffrey's style is amazing ! I love it ! Even people with no IT knowledge could start by watching the simple php video lesson ! So if you don't understand the advantages to work with a robust and "simple" framework..if you are not able to use composer or display a simple "hello world" with 20 years of PHP....damm...cannot believe it ! Something is wrong with what you explain then. So really watch a complete serie and take notes and retry by yourself, download the code on github and read it if you prefer.... do what you want, you're mature ! If you don't want us to help...leave this road...and ask your responsible (how lucky people are in this project...damm), to hire somebody here, he will find a lot of people with less than 20 years of php experience, but very enthousiasts !!! So again, you have the choice....

KNietzsche left a reply on Laravel Training • 1 month ago

So again, you have the choice....continuer to be negative, frustrated and leave the project you're assigned to...there's no obligation to work if you don't want...with your experience you will find lot of other things to do....or be positive like we all here after we discovered all the features and possibilities with a so great framework as Laravel. Believe us ! And once you slowly start to think positive, we will all be there to support you if needed. And then you will apologize to Laracasts, and we will maybe be friends ! Just try for real, and we speak about that in 3 months ! It's your choice ! No obligation to critic Laravel or Laracasts super support if you don't want to try to discover !

KNietzsche left a reply on Best Practice For Settings Table In Database And How To Implement In Laravel? • 1 month ago

well if you have "global" settings you can save the parameters into a file like .env using config('yourfile.yourparameter'); like you have in the following video Adding Featured Content otherwise, just declare a migration for a table as usually, the structure depends if it's different for each user or some other criteria..declare a Model with a function hasMany for the relationship...I see nothing wrong with your idea if it's general parameters.

KNietzsche left a reply on HttpException "This Action Is Unauthorized" • 1 month ago

hard to see without the error message...but....last time I got such an issue, it was because my session has expired....I simply refilled the login screen with user/password and all was ok...maybe it's your case, you can try, it takes 20sec....else...good luck !

KNietzsche left a reply on Laracasts Premium Registration Not Workin? • 1 month ago

@nagavinod424 it's not a bug, your bank of Baroda is blacklisted.... of course, my post is a joke, lol !

otherwise try to send a mail to Jeff to check or find an alternative, he will answer, he answered to my question some days after, but he did answer ! I've got no problem with a mastercard.

KNietzsche left a reply on Very Fast Teaching Way • 1 month ago

yep ! if you catched only the sentence you wanted to catch in the whole paragraph where I have given tons of thoughts, then maybe you need to switch to a positive attitude ! If you were not able to understand some basics after 11 videos, either you started with the wrong serie or you need to start with algorithmic, basis of html, php....but there is a problem ! Remember, I'm here to share, I'm not a world champion of php and Laravel, I'm learning as well every day. So you are free to think what you want, and I wish you the best of course, but I can see so many stupid questions from people that registered 1 hour ago from their first question and don't say thanks and don't come later...but be sure, that if you persevere, and if you have a question, if I can help, I will try ! so good luck and try to keep the positive message I wanted to share...good luck !

25th June, 2017

KNietzsche left a reply on MethodNotAllowedHttpException • 1 month ago

Well, there were several problems in your post...I cannot believe that was the only issue...you first...were not even able to see your form so next time, add the description ...when I click on submit button....!! that will help us to understand your problem...

KNietzsche left a reply on MethodNotAllowedHttpException • 1 month ago

what is self::$data ?

KNietzsche left a reply on MethodNotAllowedHttpException • 1 month ago

  1. you added the routes in your previous message after my answer...not easy to follow
  2. you have Route::get('user/signin', [email protected]'); and class UserController extends MainController so already, you have a LowerCase UpperCase mismatch....with UserController in your route and still the problem with <a href="{{url('úser/singup')}}">Create new account</a>in your blade file.

KNietzsche left a reply on MethodNotAllowedHttpException • 1 month ago

still cannot see the tree for your views to check if you have a dir forms and a signin.blade.php file....and your route in web.php file to check....and also notice that you have a url('úser/singup')code that looks strange....

KNietzsche left a reply on Concaténation Des Array • 1 month ago

First...even in french I have problems to understand your question...lol Second... read the php documentation on array_push() in php : that could help I thinks it's better to make an effort and communicate in english here, even with mistakes, we don't care...

KNietzsche left a reply on MethodNotAllowedHttpException • 1 month ago

These lines are comments : they don't show the routes and we cannot see if you created a controler, or if you created the view...so it's not possible to help at this point ! Maybe you can search in the discussions with the exception you get, and check the answers with your case , I have read it a lot of times already !

23rd June, 2017

KNietzsche left a reply on How Do I Use Vue Router And Normal Laravel Route Together • 1 month ago

@topvillas tks I will try that too in the next days to understand all the cases with a complete SPA project..

KNietzsche left a reply on How Do I Use Vue Router And Normal Laravel Route Together • 1 month ago

cannot believe as you can call laravel routes from a component ! did it, and I have given the code ! so even if you don't use the blade template you should be able to do the same I did. Did you try ? I must say, that I was perplex when I wrote a previous post as well... After, it can depend on what you want to do ...if you want laravel policies, controllers etc That's why I wanted a mix using laravel routes, rewriting the template (really easy to do with blade) and Vuetify for my case... This discussion is interesting, let's go to the end of your problem....

KNietzsche left a reply on How Do I Use Vue Router And Normal Laravel Route Together • 2 months ago

It's not possible to what ?

KNietzsche left a reply on How Do I Use Vue Router And Normal Laravel Route Together • 2 months ago

If in a vue component you can call a Laravel route...and you already know how to route to a Vue template....if you remove the {{ }} and replace with a laravel url...that should work too ! ok, lol...but, what do you want to know indeed ?

KNietzsche left a reply on How To Change The Paginator Arrow Button To String "next" And "previous" • 2 months ago

Here is the link ...https://laravel.com/docs/5.4/pagination#customizing-the-pagination-view There should be a views/vendor/pagination/default.blade.php file where you can customize...A have a link to a video, but it's in french...so I hope you can understand the documentation...it's easy !

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.