An intermediate/advanced look at how to use Angular JS in conjunction with a server-side.

Overview

end-to-end-with-angularjs

This repository covers material in 2 screencasts,

This is an extension of my screencast Intro to Angular JS that focuses more on intermediate/advanced topics and walks through creating a working web application on top of the Laravel 4 Web Application Framework.

Things you can expect to learn from End to End with Angular JS:

  • $http
  • $rootScope
  • taking the AuthenticationService we built earlier end-to-end
  • creating a FlashService for displaying alerts to users
  • access control for client-side routes with $rootScope and $routeProvider
  • $httpProvider.responseInterceptors and logging out users automatically if serverside sessions expire
  • $routeProvider.resolve property and making view rendering data dependent
  • laravel 4 migrations, controllers, models, and authentication

Things you can expect to learn from Security with Angular JS:

  • 3 common-sense ways to secure your web application
  • angular.constant
  • ng-init
  • ng-sanitize
  • Laravel CSRF support, route filters, and built in protection

Requirements:

Prerequisite Installation Instructions:

Installing PHP 5.4 and MCrypt is the most tedious part of getting up and running with this example, but Laravel 4 is so nice that I think it's worth it. Here's the basic instructions for getting up on Mac OS X:

  1. Install Homebrew
  2. Make sure you correct any problems that brew doctor detects
  3. Install Laravel 4
  4. Tap the PHP keg from @josegonzalez: brew tap josegonzalez/php
  5. Install PHP 5.4 brew install php55
  6. Install MCrypt brew install php55-mcrypt (this will automatically link the binary into the php.ini for you)
  7. Install Composer brew install composer (think of it like homebrew, or npm, or apt-get, but for PHP modules)

App Installation Instructions:

  1. clone this repo: git clone https://github.com/davemo/end-to-end-with-angularjs.git
  2. install composer dependencies composer install
  3. create a database called laravelapp
  4. create your unique security key php artisan key:generate
  5. run database migrations php artisan migrate
  6. seed the database php artisan db:seed
  7. run the app php artisan serve
  8. browse to http://localhost:8000 and log in with email [email protected] and password admin

Once you have the app up and running you can visit http://localhost:8000 and you will see the Login Form.

If you liked this code and screencast you should follow me on twitter: @dmosher

Happy Coding! :)

You might also like...
Laravel Vue SPA, Bulma themed. For demo login use `admin@laravel-enso.com` & `password` -
Laravel Vue SPA, Bulma themed. For demo login use `[email protected]` & `password` -

Laravel Enso Hit the ground running when building your new Laravel SPA project with boilerplate and extra functionality out of the box! click on the p

Automatically Create professional ready to use Laravel REST API for MySQL Database With Postman Docs and JWT Authentication

Laravel Simple Rest API Generator An API Boilerplate to create a ready-to-use REST API in seconds with Laravel 8.x Install with Composer $ curl -s

Github repository dedicated for my YT tutorial which shows how to use Sessions in Laravel

Sessions in Laravel The following documentation is based on my Laravel Sessions for Beginners tutorial we’re going to cover the basics of sessions in

Use this skeleton application to quickly setup and start working on a new Slim Framework 4 application

Slim Framework 4 Skeleton Application Use this skeleton application to quickly setup and start working on a new Slim Framework 4 application. This app

Meridian is a simple to use SAAS invoicing and Purchasing platform for customers to signup with credit card via stripe subscriptions.
Meridian is a simple to use SAAS invoicing and Purchasing platform for customers to signup with credit card via stripe subscriptions.

Codekerala - Meridian NOTE This project is no longer maintained. Meridian is a simple to use SAAS invoicing and Purchasing platform for customers to s

Api first backend boilerplate build with laravel 🎯 you can use as a template 😉

Laravel Backend Template i use this as a starting point for my backend projects , it saves time with basic auth functionalities and has code examples

Laravel Angular Time Tracker is a simple time tracking application built on Laravel 5.2, Angular 2, and Bootstrap 3.

Laravel 5.2, Angular 2, and Bootstrap 3.3.* Time Tracker Laravel Angular Time Tracker is a simple time tracking application built on Laravel 5.2, Angu

YCOM Impersonate. Login as selected YCOM user 🧙‍♂️in frontend.

YCOM Impersonate Login as selected YCOM user in frontend. Features: Backend users with admin rights or YCOM[] rights, can be automatically logged in v

RecordManager is a metadata record management system intended to be used in conjunction with VuFind.

RecordManager is a metadata record management system intended to be used in conjunction with VuFind. It can also be used as an OAI-PMH repository and a generic metadata management utility.

Sample application to bookmark links, where interface build with Angular.js + Twitter Bootstrap and server powered by PHP with Slim Framework

RESTful Bookmarks PHP Slim TODO: review and update FrontEnd Sample application to bookmark links, where interface build with Angular.js + Twitter Boot

Builds PHP so that multiple versions can be used side by side.

php-build php-build is a utility for building versions of PHP to use them side by side with each other. The overall structure is loosly borrowed from

A comprehensive library for generating differences between two strings in multiple formats (unified, side by side HTML etc). Based on the difflib implementation in Python

PHP Diff Class Introduction A comprehensive library for generating differences between two hashable objects (strings or arrays). Generated differences

Aplicação criada com Angular e Laravel em conjunto para fazer um treinamento de autenticação com sistema de login, guarda de rotas e cadastro de usuários no banco de dados MySQL
Aplicação criada com Angular e Laravel em conjunto para fazer um treinamento de autenticação com sistema de login, guarda de rotas e cadastro de usuários no banco de dados MySQL

Times-de-Futebol-BR Descrição do Projeto Aplicação criada com Angular e Laravel em conjunto para fazer um treinamento de autenticação com sistema de l

Generator-hedley - Scaffold a headless Drupal backend, Angular app client, and Behat tests

generator-hedley Scaffold a headless Drupal backend, Angular app client, and Behat tests Hedley is a yeoman generator that scaffolds a headless Drupal

Monorepo of the PoP project, including: a server-side component model in PHP, a GraphQL server, a GraphQL API plugin for WordPress, and a website builder
Monorepo of the PoP project, including: a server-side component model in PHP, a GraphQL server, a GraphQL API plugin for WordPress, and a website builder

PoP PoP is a monorepo containing several projects. The GraphQL API for WordPress plugin GraphQL API for WordPress is a forward-looking and powerful Gr

Monorepo of the PoP project, including: a server-side component model in PHP, a GraphQL server, a GraphQL API plugin for WordPress, and a website builder
Monorepo of the PoP project, including: a server-side component model in PHP, a GraphQL server, a GraphQL API plugin for WordPress, and a website builder

PoP PoP is a monorepo containing several projects. The GraphQL API for WordPress plugin GraphQL API for WordPress is a forward-looking and powerful Gr

Use Permify in server-side PHP Projects.
Use Permify in server-side PHP Projects.

Permify Php Library Use Permify in server-side PHP Projects. What is Permify? Permify is a plug-&-play authorization API that helps dev teams create g

This component may look complex, weird and full of hacks but it is a game changer for how we run PHP applications.
This component may look complex, weird and full of hacks but it is a game changer for how we run PHP applications.

PHP Runtimes In early 2021, Symfony created a "Runtime component". This component may look complex, weird and full of hacks but it is a game changer f

Demo of how you can run your Laravel app with Docker Compose. Look at docker-compose.yml and the docker folder. The rest is just a clean Laravel + Horizon install.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Comments
  • composer install error

    composer install error

    Hello, I am following your instructions to use this project: 1-clone this repo: git clone https://github.com/davemo/end-to-end-with-angularjs.git 2-install composer dependencies composer install 3-create a database called laravelapp 4-create your unique security key php artisan key:generate 5-run database migrations php artisan migrate 6-seed the database php artisan db:seed 7-run the app php artisan serve 8-browse to http://localhost:8000 and log in with email [email protected] and password admin

    But when I run the command "composer install", I get this error: Mac-mini-de-Soluciones-2:end-to-end-with-angularjs simorg$ composer install Loading composer repositories with package information Installing dependencies (including require-dev)

    • Installing psr/log (dev-master a78d650) Loading from cache
    • Installing monolog/monolog (dev-master ec39618) Loading from cache
    • Installing filp/whoops (1.0.7) Loading from cache
    • Installing nikic/php-parser (0.9.x-dev ef70767) Loading from cache
    • Installing jeremeamia/superclosure (1.0.1) Loading from cache
    • Installing doctrine/lexer (dev-master 83893c5) Loading from cache
    • Installing doctrine/annotations (dev-master 6a6bec0) Loading from cache
    • Installing doctrine/collections (dev-master 8c5148e) Loading from cache
    • Installing doctrine/cache (dev-master f7a1d66) Loading from cache
    • Installing doctrine/inflector (dev-master 64de2fe) Loading from cache
    • Installing doctrine/common (dev-master 559a805) Loading from cache
    • Installing doctrine/dbal (2.4.x-dev f15c482) Loading from cache
    • Installing symfony/translation (2.3.x-dev 638d6e0) Loading from cache
    • Installing symfony/routing (2.3.x-dev 22ee195) Loading from cache
    • Installing symfony/process (2.3.x-dev 0434822) Loading from cache
    • Installing symfony/debug (2.3.x-dev 9760bae) Loading from cache
    • Installing symfony/http-foundation (2.3.x-dev c8f7e5c) Loading from cache
    • Installing symfony/event-dispatcher (2.3.x-dev 3e0b837) Loading from cache
    • Installing symfony/http-kernel (2.3.x-dev 17bb005) Loading from cache
    • Installing symfony/finder (2.3.x-dev fc25dab) Loading from cache
    • Installing symfony/dom-crawler (2.3.x-dev 64b9087) Loading from cache
    • Installing symfony/css-selector (2.3.x-dev a8826cf) Loading from cache
    • Installing symfony/console (2.3.x-dev e593294) Loading from cache
    • Installing symfony/browser-kit (2.3.x-dev 6a403ee) Loading from cache
    • Installing swiftmailer/swiftmailer (v5.0.3) Loading from cache
    • Installing predis/predis (0.8.x-dev 4123fcd) Loading from cache
    • Installing patchwork/utf8 (v1.1.25) Loading from cache
    • Installing nesbot/carbon (1.13.0) Loading from cache
    • Installing ircmaxell/password-compat (1.0.x-dev 1fc1521) Loading from cache
    • Installing symfony/filesystem (dev-master 7d97789) Loading from cache
    • Installing classpreloader/classpreloader (1.0.2) Loading from cache
    • Installing laravel/framework (4.0.x-dev 7be5f82) Loading from cache

    monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required)) monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server) monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server) monolog/monolog suggests installing raven/raven (Allow sending log messages to a Sentry server) monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server) monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB) monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server) monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar) monolog/monolog suggests installing videlalvaro/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib) symfony/translation suggests installing symfony/config () symfony/translation suggests installing symfony/yaml () symfony/routing suggests installing symfony/config () symfony/routing suggests installing symfony/yaml () symfony/debug suggests installing symfony/class-loader () symfony/event-dispatcher suggests installing symfony/dependency-injection () symfony/http-kernel suggests installing symfony/class-loader () symfony/http-kernel suggests installing symfony/config () symfony/http-kernel suggests installing symfony/dependency-injection () predis/predis suggests installing ext-phpiredis (Allows faster serialization and deserialization of the Redis protocol) Writing lock file Generating autoload files {"error":{"type":"ErrorException","message":"Undefined index: timezone","file":"/Applications/MAMP/htdocs/end-to-end-with-angularjs/vendor/laravel/framework/src/Illuminate/Foundation/start.php","line":154}}Script php artisan optimize handling the post-install-cmd event returned with an error

    [RuntimeException]
    Error Output:

    install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]

    Mac-mini-de-Soluciones-2:end-to-end-with-angularjs simorg$

    May you help me?

    opened by arivasvera 13
Owner
David Mosher
Canadian Software Developer, Designer, Musician and Artist
David Mosher
LaraAdmin is a Open source Laravel Admin Panel / CMS which can be used as Admin Backend, Data Management Tool or CRM boilerplate for Laravel with features like Advanced CRUD Generation, Module Manager, Backups and many more.

LaraAdmin 1.0 LaraAdmin is a Open source CRM for quick-start Admin based applications with features like Advanced CRUD Generation, Schema Manager and

Dwij IT Solutions 1.5k Dec 29, 2022
Yii 2 Advanced Project Template

Yii 2 Advanced Project Template Yii 2 Advanced Project Template is a skeleton Yii 2 application best for developing complex Web applications with mult

Sanakulov 1 Nov 1, 2021
FacEssential is a Core for PMMP, it gathers all kind of plugins needed to create a faction server. It was created from scratch by Clouds#0667.

FacEssential FacEssential is a Core for PMMP, it gathers all kind of plugins needed to create a faction server. It was created from scratch by Clouds#

Zoumi 10 Jun 13, 2022
Cipi is a Laravel based cloud server control panel that supports Digital Ocean, AWS, Vultr, Google Cloud, Linode, Azure and other VPS.

Cipi is a Laravel based cloud server control panel that supports Digital Ocean, AWS, Vultr, Google Cloud, Linode, Azure and other VPS. It comes with nginx, Mysql, multi PHP-FPM versions, multi users, Supervisor, Composer, npm, free Let's Encrypt certificates, Git deployment, backups, ffmpeg, fail2ban, Redis, API and with a simple graphical interface useful to manage Laravel, Codeigniter, Symfony, WordPress or other PHP applications. With Cipi you don’t need to be a Sys Admin to deploy and manage websites and PHP applications powered by cloud VPS.

Andrea Pollastri 907 Jan 8, 2023
Pterodactyl is an open-source game server management panel built with PHP 7, React, and Go

Pterodactyl Panel Pterodactyl is an open-source game server management panel built with PHP 7, React, and Go. Designed with security in mind, Pterodac

Pterodactyl 4.5k Dec 31, 2022
Until 2018, Backpack v3 used this Base package to offer admin authentication and a blank admin panel using AdminLTE. Backpack v4 no longer uses this package, they're now built-in - use Backpack/CRUD instead.

Note: This package is only used by Backpack v3. Starting with Backpack v4, everything this package does is included in Backpack/CRUD - one package to

Backpack for Laravel 845 Nov 29, 2022
A Laravel 5.8 API Boilerplate to create a ready-to-use REST API in seconds.

Laravel API Boilerplate (JWT Edition) for Laravel 5.8 Laravel API Boilerplate is a "starter kit" you can use to build your first API in seconds. As yo

Francesco Malatesta 1.2k Dec 18, 2022
Laravel Vue SPA, Bulma themed. For demo login use `[email protected]` & `password` -

Laravel Enso Hit the ground running when building your new Laravel SPA project with boilerplate and extra functionality out of the box! click on the p

Laravel Enso 1k Jan 3, 2023
Symfony React Blank is a blank symfony and react project, use this template to start your app using Symfony as an backend api and React as a frontend library.

Symfony React Blank Symfony React Blank is a blank symfony and react project, use this template to start your app using Symfony as an backend api and

Antoine Kingue 2 Nov 5, 2021