Git Product home page Git Product logo

devmarketer's Introduction

Advanced Blog / CMS Series

PLEASE NOTE: THIS REPO/PROJECT IS NO LONGER MAINTAINED

Due to this project being outdated. I have restarted this project under a different repo. The video series is already being filmed. You will start seeing it available soon on the DevMarketer YouTube Channel.

If you want to follow along you can visit the NEW repo which is at https://github.com/DevMarketer/DevMarketer.io.

devmarketer's People

Contributors

almurillo avatar axieum avatar carusogabriel avatar jacurtis avatar mario-fehr avatar micos7 avatar nerdylizard avatar optimized4u avatar ovidiumihaibelciug avatar raniesantos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

devmarketer's Issues

Empty Roles

When passing empty roles in UserController -> update it returns erro, how to chande that, so i can pass empty roles value ?

[TASK]: Setup flash message reminders

I want to set up flash messaging for this application. I currently have a few flash messages initiated during controller actions, but they never get displayed to the users.

So i need to go set it up so users can see them.

If a user edits a slug, then starts and cancels the edit again, this will reset the wasEdited feature back to false (should stay true)

So lets say a user edits the slug to customize it. The title should no longer auto-generate a new slug on update. Great, this works fine.

But if the user now goes back in and edits the slug again, but this time cancels it without changing, then the title will auto-generate again because wasEdited was set back to false. Intended action would be to keep it locked/customized

Role based Middleware issue

The program allows super admins to create new roles. If a user with a new role wants to access the resources, the program won't allow that user.

Base table or view not found

(2/2) QueryException
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'devmarketer.role' doesn't exist (SQL: select count(*) as aggregate from role where name = asdf)

(1/2) PDOException
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'devmarketer.role' doesn't exist

I was getting this on my 'follow along' code base and couldn't figure it out. So I downloaded your code from here and ran composer install and then npm install and then sshed into Homestead to run artisan migrate --seed. Same error.

Since I can add new users with no problem, I compared UserController and RoleController line by line looking for "role" where "roles" should be and didn't see anything. But in the error it's clearly looking for the table "role" not "roles".

I didn't run any of the Laratrust commands on your code base during installation. Is that the root of this? I've done a bunch of googling using laratrust and just laravel to find a clue and didn't see anything similar.

Where is Laravel getting confused and looking for the table role instead of roles?
If this isn't something you know off the top of your head, close this issue out and I'll figure it out eventually.
2017-08-14-150908_835x1000_scrot
2017-08-14-150941_874x1057_scrot

npm run dev - (buefy)

I tried to run (npm run dev) on the project i got this error.

When I commented the Buefy import in app.scss the npm run smoothly.

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle @~predev: @
6 silly lifecycle @~predev: no script for predev, continuing
7 info lifecycle @~dev: @
8 verbose lifecycle @~dev: unsafe-perm in lifecycle true
9 verbose lifecycle @~dev: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\xampp\htdocs\Laravel_projects\DevMarketer\node_modules.bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\AMD APP\bin\x86;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v1.0;C:\Program Files\Windows Kits\8.0\Windows Performance Toolkit;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files\Git\cmd;C:\ProgramData\ComposerSetup\bin;C:\Program Files\nodejs;C:\Program Files\Microsoft VS Code\bin;C:\Users\BDF\AppData\Local\Microsoft\WindowsApps;C:\xampp\php;C:\Users\BDF\AppData\Roaming\Composer\vendor\bin;C:\Users\BDF\AppData\Roaming\npm
10 verbose lifecycle @~dev: CWD: C:\xampp\htdocs\Laravel_projects\DevMarketer
11 silly lifecycle @~dev: Args: [ '/d /s /c', 'npm run development' ]
12 silly lifecycle @~dev: Returned: code: 1 signal: null
13 info lifecycle @~dev: Failed to exec dev script
14 verbose stack Error: @ dev: npm run development
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:891:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid @
16 verbose cwd C:\xampp\htdocs\Laravel_projects\DevMarketer
17 error Windows_NT 10.0.15063
18 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "dev"
19 error node v6.11.1
20 error npm v3.10.10
21 error code ELIFECYCLE
22 error @ dev: npm run development
22 error Exit status 1
23 error Failed at the @ dev script 'npm run development'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error npm run development
23 error You can get information on how to open an issue for this project with:
23 error npm bugs
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

Observer not working

As of Laravel 5.7, the UserObserver is not adding the API token when creating a new user and Laravel is throwing the 'no default value' error.

[Task]: Additional Things to Add to Slug Component

Noticing a few things to add to the slug component now that I am not on camera and can think straight.

  • Customize the icon with a Vue.js prop. Something like icon="fa fa-link". Make it optional and set that as the default value.
  • Maybe make the input field when customizing the slug grow to fix text. (This might not be possible. Could try to get it working through ContentEditable potentially.
  • Add a "copy to clipboard" button to copy the full url to clipboard to paste elsewhere
  • Sanitize url and subdirectory props to remove leading and trailing slashes
  • Add keybindings so that when we hit esc while editing a slug, it cancels the edit, and if you hit enter while editing a slug, it performs the saveSlug() method.
  • Truncate the slug if it gets too long in the non-edit state
  • Add lock icon to indicate that a URL is not being auto-generated anymore
  • Focus on the input box when the edit button is pressed

[Task]: Separate Admin assets from Frontend Assets

Need to have a seperate .css and .js file for admin pages, so that we aren't loading them on every frontend page load.

So far there isn't anything on the front end so it hasnt been a priority, but might as well do this sooner rather than later.

[Task]: Conditionally set onclick event for adminSlideButton

This line of code is running on every page. It doesn't need to. Change something so it only runs when the admin-slide button is present.

Right now it is causing silent errors. Not a major problem, but also not necessary.

adminSlideButton.onclick = function () {
  this.classList.toggle('is-active');
  document.getElementById('admin-side-menu').classList.toggle('is-active');
};

profile

he tried to make the route to enter the profile, but nothing, even he tried with the option to see administer and neither, I am going crazy.
Could you help me?

sorry if you do not understand very well, but I made the translation with google translate

Any Reason not to add composer lock?

I guess we should add composer file so that it will not create any problem between your version and our version due to dependency? I guess we can add it.

I think you probably don't added because this is in development and you may want to get latest version always. But it may work for you and not for us due to dependencies problem .

For other who don't understand lock files.
https://daylerees.com/the-composer-lock-file/

Thanks Alex will be following videos :)

Scripts in package.json need updating.

Running php artisan run dev still not working. Scripts need updating as mentioned in the video.

"scripts": {
    "dev": "npm run development",
    "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch-poll": "npm run watch -- --watch-poll",
    "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
    "prod": "npm run production",
    "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
  },

Post edit

Can anyone tell me how to make post edit? If I pass title value then slug field dissapear.

Minor bug

DevMarketer/resources/views/manage/permissions/create.blade.php
In this file, you added v-model twice like below.
<b-checkbox v-model="crudSelected" v-model="crudSelected" native-value="read">Read</b-checkbox>

<div class="column is-one-quarter">
                <div class="field">
                  <b-checkbox v-model="crudSelected" native-value="create">Create</b-checkbox>
                </div>
                <div class="field">
                  <b-checkbox v-model="crudSelected" v-model="crudSelected" native-value="read">Read</b-checkbox>
                </div>
                <div class="field">
                  <b-checkbox v-model="crudSelected" native-value="update">Update</b-checkbox>
                </div>
                <div class="field">
                  <b-checkbox v-model="crudSelected" native-value="delete">Delete</b-checkbox>
                </div>
            </div> <!-- end of .column -->

and I have one question.
I can't imagine how this works because crudSelected is array in vue but you set that as v-model.
I want your explanation sir! Thank you so much.
(I learnt laravel from your previous 54 blog videos on youtube.)

Regarding processing videos

Hi Alex, have you considered asking the community for some assistance? I’m a big fan of the tooling aspect of the videos. Details that we all run into eventually, like the mixing preprocessors issue, or combining multiple vue elements on one page and different ones on another. Things that you run into when you know he basics but are getting up to speed in a new technology stack. Or branching out past a post and comment app.

Those inconsequentials covered in these “watch me work videos” that are the main reason that I (and most intermediate users) enjoy them. We aren’t there for the what’s new in laravel, but for he multiauth series. I’d kill for a series on shared models between code sets, where you could some models, controllers migrations and factories between multiple apps. Extracting them to packages. That would be killer. But I’m getting off topic. I would gladly contribute 3 hours a week in one way or another to help these videos keep coming. I’m sure many people on here would too.

Just something to consider.

  • cheers

Auto generate password refactoring suggestion (my first github issue post!)

i have suggestion to refactoring auto generate password in UserController, i notice auto generated password codes is being called twice in UserController.
so instead of doing this

if (!empty($request->password)) 
{ 

   $password = trim($request->password);

} else {

   $length = 10;
   $keyspace = '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ';
   $str = '';
   $max = mb_strlen($keyspace, '8bit') - 1;
   
   for ($i = 0; $i < $length; ++$i) 
   {
       $str .= $keyspace[random_int(0, $max)];
   }   
   $password = $str;
}

how about creating small function like this one

private function generateAutoPassword()
    {

      #set manual password
      $length   = 10;
      $keyspace = '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ';
      $str      = '';
      $max      = mb_strlen($keyspace, '8bit') - 1;
      for ($i=0; $i < $length; ++$i)
      {
        $str    .= $keyspace[random_int(0, $max)];
      }
      return $str;
    }

and then call them whatever function that need dem function like for example, when we need to check user creation process, if user provide costum password then store them in db or else run auto generate password function and then store them in db, like this one.

if ($request->has('password') && !empty($request->password))
 {
      $password = trim($request->password);
  }  else {
       $password = $this->generateAutoPassword();
  }

and then another check if password is provide or not, and then store them in db

if ($request->has('password') && !empty($request->password)) 
{
       $user->password = Hash::make($request->password);

} else {

        $user->password = Hash::make($password);

}

i hope this is make sense to you alex. if you find this suggestion is silly, please give me feed back & also forgive my broken english.

Vue not working in auto generate password

Many have commented on the youtube comments of Vue not working. Similar problem exists in my code.
Even after adding
var app = new Vue({
el: '#app',
data: {}
}); to app.js, vue isnt completely working.
Doing :disabled="auto_password" seem to work as it doesn't display the password input. But when I click checkbox, the input element is not hiding or showing. Same result for v-if="auto_password".

404 when stripping user from roles on edit

In editing user, if I remove the existing roles from the user leaving him without any and click the button "edit", I get a 404 "Sorry, the page you are looking for could not be found.".
In the USerController on the update function, I guess there's a problem with $user->syncRoles() when there aren't roles to sync .

Style sheet for manage.scss

once the app is on mobile the left menu hides however the managment-area does not take advantage of the new real state when the left menu is gone. I had added this code to the manage.scss file to take advantage of that.

`.management-area {
top: 4rem;
right: 0;

@include desktop {
position: absolute;
left: 200px;
}

}`

marked current permissions

HI, im having a problem with marking already set permissions on default.
Console outputs:

[Vue warn]: Property or method "permissionsSelected" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property.

Code is 1:1 in tutorial

<div class='col-md-6'> <input type="hidden" :value="permissionsSelected" name="permissions"> <h5>Permission:</h5> @foreach ($permissions as $r) <el-checkbox v-model="permissionsSelected" :native-value="{{$r->id}}"> {{$r->display_name}} <em>({{$r->description}})</em></el-checkbox> @endforeach </div>

<script> var app = new Vue({ el: '#app', data: { permissionsSelected: {!! $role->permissions->pluck('id') !!} } }); </script>

any ideas how to fix it ?

[Proposal] Refactoring controllers

Alex, I'm considering to refactor some controllers, but I don't know your opinion about, so let me ask you:

Redirecting With Flashed Session Data

Instead of import the Session facade, call the flashmethod, why we just don't use the with?

Request validation

A small one, but works like a charm: validateWith method, that avoid to pass the request variable. Ex:

$this->validate($request, $array_of_rules)

becomes

$this->validateWith($array_of_rules)

Model creation

I know you like to instantiate a new Model then set the attributes explicitly, but, Mass Assignment it's beautiful. Take a look at how the current store method in the RoleController can become:

$role = Role::create(request(['display_name', 'name', 'description]));

I'm intent to apply this changes at Role, Permission and User controllers. What do you think?

😄

[Task]: Before confirming Slug, Check to see if Unique

We have talked about this, but I want to make sure that our component does not create a slug, unless we know that the slug is unique.

To do this, we need to create an API endpoint to check if the post is unique, and then we need to update the Slug Widget Component to check that endpoint each time it attempts to create/save a slug. If the endpoint returns that the slug the component is attempting to save is unique then we will save it as normal, otherwise we need to keep customizing the component until it is unique.

incorporate stylus as an override

Hi Alex, as a feature request, are you able to show how you might do your overrides in stylus, and still use laravel mix or webpack to merge them into a single css file? I've been running against this trying to incorporate bulma with some of our existing libraries.

To clarify, since bulma is written in sass, and some other libraries stylus or less, pulling them all together into a vendor.css has been a real challenge. This is doable in gulp since it's simpler to chain method together and also to move things out of the public folder.

With laravel mix, or webpack if you operate on an output file, even if it's an intermediary staging file you are triggering a change. Which make it impossible to use something like npm run watch, since it re-triggers itself.

Thanks for the great tutorials.

HttpException No message

While trying to access url http://localhost:8000/manage/dashboard directly without logging in we are getting HttpException No message error. Tried to fix it by my own following the tutorials of multi-auth series and try to redirect it to login but I found too many things flying around. unauthenticated. method isn't available in Kernel.php in Laravel 5.5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.