PHPackages                             flaviojr/tatooine - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. flaviojr/tatooine

ActiveProject[Framework](/categories/framework)

flaviojr/tatooine
=================

Start point for new projects

v1.0(8y ago)2121MITPHPPHP &gt;=7.0.0

Since Dec 22Pushed 8y agoCompare

[ Source](https://github.com/flavio-jr/tatooine)[ Packagist](https://packagist.org/packages/flaviojr/tatooine)[ RSS](/packages/flaviojr-tatooine/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

Tatooine
========

[](#tatooine)

Start point for newer projects. Build with Laravel and Vue 👌

#### Some cool stuff:

[](#some-cool-stuff)

- Authorization implemented with Laravel Auth
- Security schema for management of user and their permissions
- Some cool reusable Vue components, such as a Datagrid and Action (buttons and anchors)
- Custom Menu for each user
- Controller to show/hide buttons and anchors(with Action component)

Build
=====

[](#build)

To get going you only need to do the following:

```
$ composer install
$ cp .env.example .env
$ php artisan key:generate
$ php artisan migrate && php artisan db:seed
$ npm install
$ npm run dev
$ ./vendor/bin/phpunit
$ php artisan serve
```

Usage
=====

[](#usage)

#### Seeds

[](#seeds)

All your routes (resources/permissions) must me mapped in the database, so that the permission control can work properly. To create new resources and their permissions you have to register them in `ResourcesPermissionsSeeder` class. This is simply done by:

```
$this->createNewResource(['users' => 'User management'], [
            'index'   => 'Users list',
            'create'  => 'Creates new user',
            'edit'    => 'Update user info',
            'delete'  => 'Delete a user',
            'details' => 'Manage user profiles'
]);
```

> **Note**: Tatooine only accept routes in the `resource/permission/{parameters}` format.

> **Note**: You can change the method description, Tatooine will update it info. You can also delete a permission, just remove it from the permissions `array`.

To run the seeder you can use the command: `$ php artisan resource:run`

### Custom configuration

[](#custom-configuration)

Tatooine provides a flexible way to design your routes. You can easily set in your .env like the following:

```
BASE_ROUTE='tatooine' //Used as the first part of your route. Ex.: yoursystem.com/tatooine/home
MIX_BASE_ROUTE='security' //This one is used by JS to append on AJAX calls
CUSTOM_HOME='home' //Where the application goes when is accessed and after login

```

Now Tatooine knows how to map your routes.

### Helper functions

[](#helper-functions)

There is a `Helper` class (in app/Helper.php) where are two useful global methods

- **baseUrl**: Retrieves your application full url with your `base_route`(Ex.: `yoursystem.com/tatooine`). This function have an optional parameter `$complement`, wich can be used to complement your base route (Ex.: `yoursystem.com/tatooine/users/create`)
- **home**: Simple function to return the full path of your custom home route

### Tatooine super classes

[](#tatooine-super-classes)

Tatooine comes with three super classes: Model, Repository and Request. The application use them instead of the native classes of Laravel for aditional funcionalities. They live on `Core` namespace(Ex.:`Core\Model`)

- **Model**: Has just one method, getFilterColumns(), wich returns the `$filterColumns` array containing the "filterable" columns and the corresponding operator for the filter to use. This array must be defined in your Model classes like bellow: ```
    $filterColumns = [
        'usr_name' => 'like',
        'usr_enabled' => '='
    ]
    ```
- **Request**: Simple extend it and define rules() method, more details on the laravel documentation:
- **Repository**: Accepts an Model instance. Has one public method, listModel(\[\]). You may use it for retrieve paginated and filtered data. You can call any other `Eloquent\Model` method, the Repository class will pass the call to its Model instance (unless a method with the same name is defined in it)
    - **Tip**: Use the `listModel` method in combination with DataGrid component(described bellow).

### Available Vue components

[](#available-vue-components)

Tatooine comes shipped with two reusable components, Action and DataGrid.

#### Action

[](#action)

> ``

This component can render a button/anchor dynamically, based on the user permissions. The usage is simle as below:

```

  Criar novo usuário

```

Action props:

- **action**: The url to the action. In an anchor it will be an `href`. Action will use it to check permissions
- **aclass**: Will aply `class` to the anchor/button
- **icon(optional)**: Will set an icon to the button
- **type**: Action component will use this to determine if it will render a anchor or a button. Possible values are: 'anchor' and 'button'

Action events:

- **btn-clicked**: When action type is 'button', the Action component attach a btn-clicked event to the `click` native event so that you can control what it will do. Then you can listen to the event like below:

```
doSomethingWithThis (url) {
 //Whatever you want
}
```

> ***Note***: The component has a `slot` inside the anchor/button tag. So that you can pass additional info inside the component

#### Datagrid

[](#datagrid)

> ``

This component renders a paginated grid, with filter options. Also, you can define actions for each row. The usage:

```

```

DataGrid props:

- **url**: You API to retrieve the data to DataGrid.
- **primary-key**: This will be used in the grid actions as a parameter, must be a present field on the data retrieved from the server.
- **user-fields**: The fields that the DataGrid will show. Has the `{field_name: 'fieldTitle'}` format.
- **actions**: You may define three type of actions: edit, delete and details. DataGrid will render delete action as a button and the other two will be anchors. In each action you must pass the url for the action. The DataGrid will pass the `primaryKey` as the parameter for each url.
- **user-filters**: To setup the filters you have to pass an object with info for each field. You must pass the type of the filter and it's size(just a number between 1 and 12, DataGrid will automatically convert to bootstrap grids classes). The type can be 'text', 'number' or 'select'. For 'select' type will have to define also its options, like bellow:

    ```
      options: {1: 'Option one', 2: 'Option 2'}
    ```

    > **Note 1**: The object key is used as the filter value

    > **Note 2**: This filter feature will be improved to allow other input types(such as 'checkbox' and 'radio
- **mutators**: To change how data is going to be visualized you can apply the mutators, just a simple key-value mechanism, you pass the value and the corresponding information to show. Like in the pattern: `{usr_enabled: {0: 'Disabled', 1: 'Enabled'}}`

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3112d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/90137833?v=4)[flaviojr](/maintainers/flaviojr)[@FlavioJR](https://github.com/FlavioJR)

---

Top Contributors

[![flavioribeirojr](https://avatars.githubusercontent.com/u/21633230?v=4)](https://github.com/flavioribeirojr "flavioribeirojr (45 commits)")

---

Tags

frameworklaravel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/flaviojr-tatooine/health.svg)

```
[![Health](https://phpackages.com/badges/flaviojr-tatooine/health.svg)](https://phpackages.com/packages/flaviojr-tatooine)
```

###  Alternatives

[laravel/laravel

The skeleton application for the Laravel framework.

84.5k63.2M1.0k](/packages/laravel-laravel)[unopim/unopim

UnoPim Laravel PIM

10.5k2.2k](/packages/unopim-unopim)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3911.7k](/packages/codewithdennis-larament)[ercogx/laravel-filament-starter-kit

This is a Filament v5 Starter Kit for Laravel 13, designed to accelerate the development of Filament-powered applications.

461.7k](/packages/ercogx-laravel-filament-starter-kit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
