Download the PHP package thanosalexander/activity without Composer

On this page you can find all versions of the php package thanosalexander/activity. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package activity

Activities tracking for Laravel

Tracks activities fired when specific types happened.


Build Status Latest Stable Version Total Downloads Latest Unstable Version License

Installation

To get the latest version of Activities simply require it in your composer.json file.

"thanosalexander/activity":"~1.0"

You'll then need to run composer install to download it and have the autoloader updated.

Once Activities is installed you need to register the service provider with the application. Open up config/app.php and find the providers key.

'providers' => array(
    ...
    ...
    \Thanosalexander\Activity\ActivityServiceProvider::class,

)

Activities also ships with two facades which provides the static syntax for creating activities. You can register the facade in the aliases key of your config/app.php file.

'aliases' => array(

    ...
    ..

    'Activity' => \Thanosalexander\Activity\Facades\Activity::class,
    'Type' => \Thanosalexander\Activity\Facades\Type::class

)

Publish the configurations

Run this on the command line from the root of your project:

$ php artisan vendor:publish

A configuration file will be publish to config/activities.php Also the migrations will be published into migrations folder!

Run the migrations

Activities package comes with two tables, activities_types and activities. Just go to terminal and run

$ php artisan migrate

Now the tables are created!

Usage

Create a new Type

All the fields are required in order to create an activity type! Also the name is unique!

Create a new Activity

The user_id field is not required in order to create an Activity! However for guest users actions the field will be nullable

Controllers

The package comes with two controllers TypeController and ActivityController. They are almost resource controller with very simple syntax.

Activities Routes

 /**
     * Activities Routes
     */
    Route::get('activities',array(
        'uses'=>'thanosalexander\activity\Http\Controllers\ActivityController@index',
        'as'=>'activities.index'
    ));
    Route::post('activities/create',array(
        'uses'=>'thanosalexander\activity\Http\Controllers\ActivityController@store',
        'as'=>'activities.store'
    ));
    Route::put('activities/update/{id}',array(
        'uses'=>'thanosalexander\activity\Http\Controllers\ActivityController@update',
        'as'=>'activities.update'
    ));
    Route::get('activities/show/{id}',array(
        'uses'=>'thanosalexander\activity\Http\Controllers\ActivityController@show',
        'as'=>'activities.show'
    ));
    Route::delete('activities/delete/{id}',array(
        'uses'=>'thanosalexander\activity\Http\Controllers\ActivityController@delete',
        'as'=>'activities.delete'
    ));

Types Routes

/**
     * Types Routes
     */
    Route::get('types',array(
        'uses'=>'thanosalexander\activity\Http\Controllers\TypeController@index',
        'as'=>'types.index'
    ));
    Route::post('types/create',array(
        'uses'=>'thanosalexander\activity\Http\Controllers\TypeController@store',
        'as'=>'types.store'
    ));
    Route::put('types/update/{id}',array(
        'uses'=>'thanosalexander\activity\Http\Controllers\TypeController@update',
        'as'=>'types.update'
    ));
    Route::get('types/show/{id}',array(
        'uses'=>'thanosalexander\activity\Http\Controllers\TypeController@show',
        'as'=>'types.show'
    ));
    Route::delete('types/delete/{id}',array(
        'uses'=>'thanosalexander\activity\Http\Controllers\TypeController@delete',
        'as'=>'types.delete'
    ));

All versions of activity with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package thanosalexander/activity contains the following files

Loading the files please wait ....