Download the PHP package angel/core without Composer
On this page you can find all versions of the php package angel/core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package core
Short Description Angel is a CMS built on top of Laravel.
License
Homepage https://github.com/JVMartin/angel
Informations about the package core
Angel CMS for Laravel 4
Angel is a CMS built on top of Laravel. It is available via Packagist.
UPDATE 8/5/2016: The Laravel 5 version of Angel is underway here.
UPDATE 3/9/2015: Just wanted to give a heads up that this project is still in very active usage and deployment and is well tested by several large applications. The eCommerce module that works with Stripe is also well tested and used.
Table of Contents
- Demo
- Installation
- Customize
- Configuration
- Using Slugs
- Develop Modules
Demo
Installation
The Angel CMS was built on top of Laravel 4.1.
Install Laravel 4.1 using the following command:
Add the angel/core
package requirement to your composer.json
file, like this:
Issue a composer update
to install the package.
After the package has been installed, open app/config/app.php
and add the following to your providers
array:
While you're in there, set debug
to true.
Delete:
- All the default routes in
app/routes.php
. - All the default filters except for the
csrf
filter inapp/filters.php
. - All controllers in
app/controllers
exceptBaseController.php
. - All the models in
app/models
, includingUser.php
. You can replace it with a.gitkeep
file for now to be sure to keep theapp/models
directory.
Create and configure your database so that we can run the migrations.
Finally, issue the following artisan commands:
Customize
Every class in the core is easily extendable.
Let's start by extending the PageController.
When extending this controller, you can create a method for each page URI that you've created in the administration panel.
Create the following file as app/controllers/PageController.php
:
Remove the old binding and bind your new class at the top of your routes.php
file:
Do a composer dump-autoload
.
Now, you should be able to navigate to http://yoursite.com/home
and see: You are home!
.
Configuration
Take a look at the config file you just published in app/config/packages/angel/core/config.php
.
Admin URL
By default, the following configuration is set:
This allows one to access the administration panel via the url http://yoursite.com/admin
.
To be secure, you may want to change this prefix. Hackers tend to target sites with URLs like this.
Admin Menu
The next section is the 'menu'
array. When you install modules, you add their indexes to this array so that they appear in the administration panel's menu.
Menu Linkable Models
Some modules come with models that you can create menu links to in the Menu
module. This array is used by the Menu Link Creation Wizard
on the Menu
module's index.
Using Slugs
Often times, you will want to let users access products, blog posts, news articles, etc. by name instead of by ID in the URL.
For instance: http://yoursite.com/products/big-orange-ball
.
To do this, you want to 'sluggify' one of the columns / properties of the model.
If you are extending the AngelModel, this is as simple as adding a slug
column to your table with a unique index:
And then setting the slugSeed
property of your model to the name of the column from which to generate the slug:
Now, slugs will be automatically generated from the name
column of the models as they are created or edited. (You can just as easily use a title
column or any other appropriate source.)
You can use the generated slugs after adding or editing some items.
For instance:
Creating Unique Slugs Manually
Sluggifying a String
Develop Modules
Here is where we'll put code snippets for developing modules.
Reorderable Indexes
Assume we're developing a persons
module package.
First, make sure that Person
extends \Angel\Core\AngelModel
and has the property protected $reorderable = true;
.
All versions of core with dependencies
illuminate/support Version 4.1.*
mobiledetect/mobiledetectlib Version 2.8.3