Skip to content

Commit

Permalink
restructure resources
Browse files Browse the repository at this point in the history
  • Loading branch information
eufelipemateus committed Oct 17, 2021
1 parent 8a9eef4 commit 197ae7d
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 85 deletions.
57 changes: 12 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,42 @@
# Laravel IPTV Customers - FelipeMateus\IPTVCustomers

[![Latest Stable Version](http://poser.pugx.org/felipemateus/iptv-customers/v)](https://packagist.org/packages/felipemateus/iptv-customers) [![Total Downloads](http://poser.pugx.org/felipemateus/iptv-customers/downloads)](https://packagist.org/packages/felipemateus/iptv-customers) [![Latest Unstable Version](http://poser.pugx.org/felipemateus/iptv-customers/v/unstable)](https://packagist.org/packages/felipemateus/iptv-customers) [![License](http://poser.pugx.org/felipemateus/iptv-customers/license)](https://packagist.org/packages/felipemateus/iptv-customers) [![PHP Version Require](http://poser.pugx.org/felipemateus/iptv-customers/require/php)](https://packagist.org/packages/felipemateus/iptv-customers)


This package controls all customers and plans integrated with [iptv-channels](https://github.com/eufelipemateus/laravel-iptv-channels) generates a list of channels for each customer.



## Instaling
[![Latest Stable Version](http://poser.pugx.org/felipemateus/iptv-customers/v)](https://packagist.org/packages/felipemateus/iptv-customers) [![Total Downloads](http://poser.pugx.org/felipemateus/iptv-customers/downloads)](https://packagist.org/packages/felipemateus/iptv-customers) [![Latest Unstable Version](http://poser.pugx.org/felipemateus/iptv-customers/v/unstable)](https://packagist.org/packages/felipemateus/iptv-customers) [![License](http://poser.pugx.org/felipemateus/iptv-customers/license)](https://packagist.org/packages/felipemateus/iptv-customers) [![PHP Version Require](http://poser.pugx.org/felipemateus/iptv-customers/require/php)](https://packagist.org/packages/felipemateus/iptv-customers)

This a Laravel package controls all customers and plans integrated with [iptv-channels](https://github.com/eufelipemateus/laravel-iptv-channels) generates a list of channels m3u8 for each customer.

Tested in Laravel 8.54.
![Screenshot Feipe Mateus IPTV Customers](https://felipemateus.com/wp-content/uploads/2021/10/image_2021-10-15_00-34-26.png)

## Instaling

### Run the command below in root to install the package in your project.
Tested in Laravel 8.54.

### Run the command below in root to install the package in your project.

```bash
composer require felipemateus/iptv-customers
```




### Verify this file 'config/app.php'

```php

<?php

...

'providers' => [

...

FelipeMateus\IPTVCustomers\IPTVProvider::class
...

];
composer require felipemateus/iptv-customers

```



### Migrate the database




```bash

php artisan migrate

```

## Extra

## License
- [more info about iptv-customers](https://felipemateus.com/blog/2021/10/gerenciador-iptv-customer)

- To add new locale compatibility you need contribute to [iptv-core](https://github.com/eufelipemateus/laravel-iptv-core/blob/main/src/Class/Locale.php) first.

[![License](http://poser.pugx.org/felipemateus/iptv-customers/license)](https://packagist.org/packages/felipemateus/iptv-customers)
## License

[![License](http://poser.pugx.org/felipemateus/iptv-customers/license)](https://packagist.org/packages/felipemateus/iptv-customers)

## Author



[Felipe Mateus](https://felipemateus.com)
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "felipemateus/iptv-customers",
"version": "0.0.2",
"version": "0.1.0",
"description": "This package controls the IPTV Customers list and generates an m3u8 file for each customer using laravel.",
"type": "library",
"license": "MIT",
Expand Down Expand Up @@ -36,8 +36,8 @@
"require": {
"php": "^7.4|^8.0",
"laravel/framework": "^8.54",
"felipemateus/iptv-core":"^0.0.1",
"felipemateus/iptv-channels": "2.1.0"
"felipemateus/iptv-core":"^1.0.0",
"felipemateus/iptv-channels": "3.0.0"
},
"autoload": {
"psr-4": {
Expand Down
8 changes: 5 additions & 3 deletions src/IPTVProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
use Illuminate\Routing\Router;
use Illuminate\Support\ServiceProvider;
use FelipeMateus\IPTVCustomers\Middleware\CustomerMiddleware;
use FelipeMateus\IPTVCore\Class\IPTVProviderBase;


class IPTVProvider extends ServiceProvider
class IPTVProvider extends IPTVProviderBase
{


Expand All @@ -20,9 +21,10 @@ public function boot()
{
$this->registerMidleware();
$this->loadMigrationsFrom(__DIR__.'/database/migrations/');
$this->loadViewsFrom(__DIR__.'/views', 'IPTV');
$this->loadViewsFrom(__DIR__.'/resources/views', 'IPTV');
$this->loadRoutesFrom(__DIR__.'/routes.php');
$this->loadJSONTranslationsFrom(__DIR__.'/translations');
$this->loadJSONTranslationsFrom(__DIR__.'/resources/translations');
$this->loadMenusFrom(__DIR__.'/resources/menu');
}


Expand Down
16 changes: 16 additions & 0 deletions src/resources/menu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"title":"Customers",
"menus":[
{
"name":"Customers",
"icon": "users",
"route": "list_customer"
},
{
"name":"Plans",
"icon": "file-contract",
"route": "list_plan"
}
]
}

18 changes: 18 additions & 0 deletions src/resources/translations/br.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"Customers": "Clientes",
"Add Customer": "Add Cliente",
"Customers List": "Lista de Clientes",
"Customer":"Cliente",
"Plans": "Planos",

"Username":"Usuário",
"Plan": "Plano",
"Plans List":"Lista de Planos",
"Add Plan": "Adicionar Plano",
"Price": "Preço",
"Plan Active?": "Plano Ativo?",
"Is additional?": "Plano adicional?",
"Channels Groups" : "Grupos de Canais",
"add group": "adicionar grupo",
"delete group": "excluir grupo"
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
@extends('IPTV::app')

@section('content')
<!-- Page Heading -->
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">{{ __('Customers') }}</h1>
</div>
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<div class="row">
<div class="col-md-3"><b>{{ __('Customers') }} </b></div>
<div class="col-md-3"><a href="{{ route('list_customer') }}">{{ __('Customers List') }}</a></div>
<div class="col-md-3"><a href="{{ route('list_plan') }}">{{ __('Plan List') }}</a></div>
<div class="col-md-3"><a href="{{ route('add_plan') }}">{{ __('Add Plan') }}</a></div>
<div class="col-md-3"><b>{{ __('Customer') }} </b></div>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
@extends('IPTV::app')

@section('content')
<!-- Page Heading -->
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">{{ __('Customers') }}</h1>
<a href="{{ route('add_customer') }}" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i
class="fas fa-plus fa-sm text-white-50"></i> {{ __('Add Customer') }}</a>
</div>
<div class="container">
<div class="row">
<div class="col-md-10 col-md-offset-2">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<div class="row">
<div class="col-md-3"><b>{{ __('Customers') }}</b></div>
<div class="col-md-3"><a href="{{ route('add_customer') }}">{{ __('Add Customer') }}</a></div>
<div class="col-md-2"><a href="{{ route('list_plan') }}">{{ __('Plan List') }}</a></div>
<div class="col-md-2"><a href="{{ route('config') }}">{{ __('Config')}}</a></div>
<div class="col-md-3"><b>{{ __('Customers List') }}</b></div>
</div>
</div>

Expand Down
11 changes: 7 additions & 4 deletions src/views/plan.blade.php → src/resources/views/plan.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@
@endsection

@section('content')
<!-- Page Heading -->
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">{{ __('Plans') }}</h1>
</div>

<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<div class="row">
<div class="col-md-6"><b>{{ __('Plan') }}</b></div>
<div class="col-md-3"><a href="{{ route('list_customer') }}">{{ __('Customer List') }}</a></div>
<div class="col-md-3"><a href="{{ route('list_plan') }}">{{ __('Plan List') }}</a></div>
</div>
</div>

Expand Down Expand Up @@ -77,7 +80,7 @@

@if(isset($Plan))
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<div class="row">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
@extends('IPTV::app')

@section('content')
<!-- Page Heading -->
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">{{ __('Plans') }}</h1>
<a href="{{ route('add_plan') }}" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i
class="fas fa-plus fa-sm text-white-50"></i> {{ __('Add Plan') }}</a>
</div>
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<div class="row">
<div class="col-md-4"><b>{{ __('Customers Plan') }}</b></div>

<div class="col-md-3"><a href="{{ route('list_customer') }}">{{ __('Customer List') }}</a></div>
<div class="col-md-3"><a href="{{ route('add_plan') }}">{{ __('Add Plan')}}</a></div>
<div class="col-md-2"><a href="{{ route('config') }}">{{ __('Config')}}</a></div>

<div class="col-md-4"><b>{{ __('Plans List') }}</b></div>
</div>
</div>

Expand Down
13 changes: 0 additions & 13 deletions src/translations/br.json

This file was deleted.

0 comments on commit 197ae7d

Please sign in to comment.