Coder Social home page Coder Social logo

zemke / starter-laravel-angular Goto Github PK

View Code? Open in Web Editor NEW
369.0 369.0 119.0 906 KB

Laravel and AngularJS Starter Application Boilerplate featuring Laravel 5.3 and AngularJS 1.5.8

Home Page: https://starter-laravel-angular.herokuapp.com

License: Other

PHP 83.26% JavaScript 6.67% ApacheConf 0.52% CSS 0.16% HTML 9.39%
angularjs boilerplate laravel laravel-elixir starter

starter-laravel-angular's People

Contributors

emmanuelgautier avatar fortis avatar seanmartinlewis avatar unicodeveloper avatar zemke 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

starter-laravel-angular's Issues

Authentication - Restricting access to Routes

Hi

Thank you for the great starter app. I am working with this and note that I cannot see an example of a restricted API route. I have tested the 'middleware' => 'auth.basic' which works as expected, but I am struggling to use token based authentication to restrict API routes with for example 'jwt.auth'.

app \ routes.php

Route::group(array('prefix' => 'api/', 'middleware' => 'jwt.auth'), function () {
    Route::resource('todo', 'TodoController');
});

app \ Kernal.php

    protected $routeMiddleware = [
        'auth' => 'Todo\Http\Middleware\Authenticate',
        'auth.basic' => 'Illuminate\Auth\Middleware\AuthenticateWithBasicAuth',
        'guest' => 'Todo\Http\Middleware\RedirectIfAuthenticated',
        'jwt.auth' => 'Tymon\JWTAuth\Middleware\GetUserFromToken',
        'jwt.refresh' => 'Tymon\JWTAuth\Middleware\RefreshToken',
    ];

However the default responses from jwt.auth are not handled by the AngularJS interceptor well. I plan on using my own middleware with the responses set out in a format which works with the Todo app, but any other ideas on approaching this would be gratefully received.

Many thanks

Tim

Page refresh logs me out

When I refresh the page, it thinks I'm logged out and I have to log back in again.

Do you plan on keeping this project updated? I want to use it for my angular application. This is the only Laravel 5 Angular starter app I could find. I will be making changes on top of it to build my app. Is there a sane way to merge your updates with mine?

Unable to connect

I've followed all the instruction regarding with the installation and all of them are successfully done but when im trying to access in http://localhost:8080, unable to connect. What did i miss? Anyone please help. Im using xampp as my local server.

Laravel 5.1 Upgrade

Any chance of getting this upgraded to 5.1 now that it's in full release?

Authentication

Hi,
I installed your starter project without problems and it works.
Is it possible do not allow the access to a page for a user not authenticated? Now I can open every page without authentication.

Internal Serval Error

Hi,

Good start point I must say. Have just installed and 'served' the app. When I tried to create a 'todo' list I'm getting this: 'Failed to load resource: the server responded with a status of 500 (Internal Server Error)'.

Could you please advise how to fix this?

Many thanks!

Problems with elixir after fresh install ?

Hey, I'm a big newbie, and I've been trying to find some bootstrap project that would help me start, and I figured this is could be perfect, yet I ran into some problems, if you would be kind enough to explain, that would be amazing:

  1. Fresh install - do instructions, try running gulp, I get:

Image of err1

Try adding these files manually:
resources/assets/style.css works if I add it myself

These two I don't know how to do, they are mistakenly being looked for in assets directory, when they are just in js directory:

File not found: resources/assets/js/app.js
File not found: resources/assets/js/appRoutes.js

Should be like:

resources/js/app.js
resources/js/appRoutes.js

If I try to add this myself:
File not found: public/js/all.js

It disappears after running gulp

Because of these gulp tasks not running I get an error when I try to serve the app :

Image of err2

Or am I doing something wrong? I swear I tried instructions 3 times (also, "php -S localhost:8080 -t public/" is not working - for me at least only "php -S localhost:8080 -t public" (without the "/") works. Php artisan serve returns same error. I'm running windows 7 64bit

Any help?

artisan app:name crashes my starter-laravel-angular

Hi,

I got a fresh copy of starter-laravel-angular, made a few changes and everything was going fine, until I tried to change my namespace. Got this when tried to change it:

bruno@brno ~/workspaceUTF8/starter-laravel-angular $ php artisan app:name csd
PHP Fatal error: Cannot redeclare class csd\Exceptions\Handler in /home/bruno/workspaceUTF8/starter-laravel-angular/app/Exceptions/Handler.php on line 42
PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Class Todo\Exceptions\Handler does not exist' in /home/bruno/workspaceUTF8/starter-laravel-angular/bootstrap/cache/compiled.php:1286
Stack trace:
#0 /home/bruno/workspaceUTF8/starter-laravel-angular/bootstrap/cache/compiled.php(1286): ReflectionClass->__construct('Todo\Exceptions...')
#1 /home/bruno/workspaceUTF8/starter-laravel-angular/bootstrap/cache/compiled.php(1237): Illuminate\Container\Container->build('Todo\Exceptions...', Array)
#2 /home/bruno/workspaceUTF8/starter-laravel-angular/bootstrap/cache/compiled.php(1775): Illuminate\Container\Container->make('Todo\Exceptions...', Array)
#3 /home/bruno/workspaceUTF8/starter-laravel-angular/bootstrap/cache/compiled.php(1060): Illuminate\Foundation\Application->make('Todo\Exceptions...', Array)
#4 /home/bruno/workspaceUTF8/starter-laravel-angular/bootstrap/cache/compiled.php(1284): Illuminate\Container\Container->Illuminate\Container{closure}(Object(Illuminate\Foundation\Application), Array)
#5 /home/bru in /home/bruno/workspaceUTF8/starter-laravel-angular/bootstrap/cache/compiled.php on line 1286

The artisan command pretty much crashed after this. So I got another fresh copy of the code and tried it before making any change. Sadly the problem ocurred anyway.

Does anyone knows how can I fix it?

Thanks in advance, sorry for my broken english and congrats for this nice piece of code. =D

Trouble changing the namespace

Hello,

First, thank you for this excellent starter kit!

I'm trying to change the namespace after cloning the repo, running composer install, npm install, gulp, etc., but I keep getting a fatal error: Class 'App\User' not found

I'm using homestead and I can get everything working beautifully, but as soon as I do "php artisan app:name App" - I get the Class no found error.

Any idea what's going on here? I see that you changed the namespace from tel to 'Todo' a couple months ago, how can I go about doing this?

Kind Regards,

Nikesh.

Auth question.

Hi,

What is the purpose of these files :

  • Auth/AuthController.php
  • Auth/PasswordController.php

They seems to not being used while signing up a user (or maybe I broke something !)

The UserController is fired with the store() method and with no validation.

Can not run gulp

gulp can not be run, because can not install caniuse-db/data, therefore can't mix js and css file

Todo List for each user

Hey There,

Really glad to find this repo. I was wondering if we could add a boiler plate so that when a user creates a to-do list, he/she would be the only one able to view it.

Currently, all users could see all todos. I am newbie in laravel, however, I would appreciate if I could get some help there too :)

Sign Up or Sign In doesn't return a user object.

Hi, I noticed on my local server, when ever i create a new user, the user object from the server is not returned. Same thing when I sign in or create a new todo item. After creating a todo item, i see undefined in the url /todos/view/undefined.
I'm pretty new to angularjs and I want to use this as starting point to learn angularjs + laravel.
Can someone help me out here, i don't know what to do?

Something wrong with Elixir

I try perfectly and exactly as you write but I got an issue like this..

file_get_contents(C:\xampp\htdocs\lvmaster\public/build/rev-manifest.json): failed to open stream: No such file or directory

Can you give me a shot to solve this?

installation error.

Hi,
when i am going to install your application it gives error:
file_get_contents(E:\wamp\www\starter-laravel-angular\public/build/rev-manifest.json): failed to open stream: No such file or directory (View: E:\wamp\www\starter-laravel-angular\resources\views\layout.blade.php)

node is installed
npm is installed but gulp is not found.
please guide me to make it.
Thanks

Different templates

Hi Zemke. I want to add another layout for some views. Specifically I modified layout.blade.php to offer an admin like view with a sidebar and some other useful stuff. However this view makes no sense if the user is not logged in. As it is now the route auth/login shows the login fields inside the admin view. Id like to add a new almost blank view for some routes such as '/', '/auth/login and 'auth/signup', however I cant find out how to do this. In normal laravel blade stuff I usually did this with the @extends directive but I dont want to rely on laravel for the front end. Could you give me some guide? Thanks.

Inquiry on template system

Many template contain @extends('app')

but in the file system I only can find app.blade.php but I can find layout.blade.php in
/resources/views

Is the app a reserved word to point to the layout.blade.php file?
Thanks.

Hi! Im getting some issues with Tymon JWT

When I try to login or register i get this error:

ReflectionException in Container.php line 741:
Class Tymon\JWTAuth\Providers\Storage\Illuminate does not exist

I cloned the repo and added some migrations, seeds and models. I tried composer dump-autoload and verified the app config. Do you have some idea about what can I do? Thanks!

Authentication for all pages?

Anyone could give me tips on how to require authentication for all pages? Then if user logs in - to redirect to home page?

I've done something like this:

$routeProvider
      .when('/', {
        templateUrl: '/partials/index',
        controller: 'MainController',
        authenticate: true
      })
      .when('/:category/:action?/:id?', {
        templateUrl: function (params) {
          var allowedParams = ['category', 'action', 'id'];
          var paramVals = [];
          for (var key in params) {
            if (allowedParams.indexOf(key) !== -1) {
              paramVals.push(params[key]);
            }
          }
          return '/partials/' + paramVals.join('/');
        },
        authenticate: true
      })
      .otherwise({
        redirectTo: '/auth/login'
      });

But seems like something is not right.

Any tips?

Error while running gulp (elixir)

Hello,
i've read all the previous issues, and mine looks similare to the one resolved by #10

But i've followed the steps and when i run "gulp" in my command menu, i got this errors :
"'ErrorException' with message 'file_get_contents(C:\wamp\www\starter-laravel-angular\public/build/rev-manifest.json): failed to open stream: No such file or directory (View: C:\wamp\www\starter-laravel-angular\resources\views\layout.blade.php)' in C:\wamp\www\starter-laravel-angular\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php:668"

And in the command it show :
gulp_elixir

i've tried all the solutions in every issue here but nothing work.

Don't know if it can help you but i got a warning when i enter "npm install" its "WARN package.json @ No repository field"

Thanks

New angular dependencies

Hi Zemke. I am testing your code and I would like to add some dependencies using npm running the following command at the project root:

npm install datatables.net

I can see npm downloading the files to a node_modules at the project root. However I see there is an angular_modules at resources/assets/js/libs/angular_modules. The gulpfile includes this folder with 'libs/*/.js'. My question is: within your app, which would be the proper way to use npm to install a library and use it inside a controller? Thanks.

Unix Socket in config causes issues with install

Great boilerplate! It's really helped me get to grips with AngularJS.

The default socket in starter-laravel-angular/config/database.php will throw people who are installing this without xampp. Can it be removed by default?

No protected route found

I gone through the application, I like it over all, but I don't found any protected route in the app,
All route are public, so what is meaning of login procedure ?

RuntimeException in compiled.php line 7051:

No supported encrypter found. The cipher and / or key length are invalid.

in compiled.php line 7051
at EncryptionServiceProvider->Illuminate\Encryption\{closure}(object(Application), array()) in compiled.php line 1289
at Container->build(object(Closure), array()) in compiled.php line 1242
at Container->make('encrypter', array()) in compiled.php line 1780
at Application->make('Illuminate\Contracts\Encryption\Encrypter') in compiled.php line 1334
at Container->resolveClass(object(ReflectionParameter)) in compiled.php line 1318
at Container->getDependencies(array(object(ReflectionParameter)), array()) in compiled.php line 1304
at Container->build('Illuminate\Cookie\Middleware\EncryptCookies', array()) in compiled.php line 1242
at Container->make('Illuminate\Cookie\Middleware\EncryptCookies', array()) in compiled.php line 1780
at Application->make('Illuminate\Cookie\Middleware\EncryptCookies') in compiled.php line 9614
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 2982
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9614
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9604
at Pipeline->then(object(Closure)) in compiled.php line 2254
at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2237
at Kernel->handle(object(Request)) in index.php line 53

I should add that I am new at this like started yesterday new.....

Login with OAuth

Would be nice to have support for Facebook/Twitter/Google Login in the Starter

Auth

AngularJS token-based authentication will be added in the very near future.

Lumen?

Zemke/starter-laravel-angular was written before there was Lumen. Now there’s the micro-framework Lumen which is basically a lite version of Laravel. Since for this project Laravel is only the endpoint, Lumen might be a a better solution since it’s faster. Thoughts?

Critical vulnerabilities in JSON Web Token libraries

Hi Zemke,

I think I mentioned this before, but really handy starter!

Anyway, I came across this article the other day and was wondering if your implementation addresses some of the concerns they mention.

Just a friendly inquiry as I'm not strong with all the intricacies of JWT quite yet.

Cannot find module 'detective'

$ gulp
module.js:339
throw err;
^

Error: Cannot find module 'detective'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (C:\Users\Aios\laradock\laravel\node_modules\laravel-elixir\node_modules\browserify\node_modules\module-deps\index.js:6:17)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)

file_get_contents(/app/public/build/rev-manifest.json): failed to open stream: No such file or directory (View: /app/resources/views/layout.blade.php)

Hi. I am trying to upload this starter to heroku, and I get this error:

file_get_contents(/app/public/build/rev-manifest.json): failed to open stream: No such file or directory (View: /app/resources/views/layout.blade.php)

The program works well offline on Homestead, but when I push the changes to Heroku this error appears. You can check it out at https://dry-lake-8666.herokuapp.com/.

This is the gulpfile.js

var elixir = require('laravel-elixir');

/*
Elixir Asset Management
--------------------------------------------------------------------------

|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Less
| file for our application, as well as publishing vendor resources.
|
*/

elixir(function (mix) {
mix
.less(
'app.less'
)
.styles([
'style.css'
])
.scripts([
'libs//*.js',
'app.js',
'appRoutes.js',
'controllers/
/.js',
'services/__/
.js',
'directives/*/.js'
])
.version([
'public/css/all.css',
'public/js/all.js'
])
.copy(
'public/js/all.js.map', 'public/build/js/all.js.map'
)
.copy(
'public/css/all.css.map', 'public/build/css/all.css.map'
);
});

And this are the contents of rev-manifest.json:

{
"css/all.css": "css/all-dd351c50bd.css",
"js/all.js": "js/all-ee8c46d8d5.js"
}

Do you know how can I fix it?

Creating a new MVC?

I was wondering what is the basic process too creating a new MVC / table to work in the same way as your todo with the API and page routeing?

Say a posts controller / modal and views with the angular routeing included?

I tried the normal route by copyings the MVC of the todos and manually created the table but I suspect this is wrong. It hasn't created the angular controllers, something now I suspect gulp does? I have never used gulp before.

Thanks

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.