--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="BladeInjectionConfiguration" default="false">
+ <directives>
+ <data directive="@append" />
+ <data directive="@auth" injection="true" prefix="<?php if(auth()->guard(" suffix=")->check()): ?>" />
+ <data directive="@break" injection="true" prefix="<?php if(" suffix=") break; ?>" />
+ <data directive="@can" injection="true" prefix="<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check(" suffix=")): ?>" />
+ <data directive="@canany" injection="true" prefix="<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->any(" suffix=")): ?>" />
+ <data directive="@cannot" injection="true" prefix="<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->denies(" suffix=")): ?>" />
+ <data directive="@case" injection="true" prefix="<?php case (" suffix="): ?>" />
+ <data directive="@choice" injection="true" prefix="<?php echo app('translator')->choice(" suffix="); ?>" />
+ <data directive="@component" injection="true" prefix="<?php $__env->startComponent(" suffix="); ?>" />
+ <data directive="@componentfirst" injection="true" prefix="<?php $__env->startComponentFirst(" suffix="); ?>" />
+ <data directive="@continue" injection="true" prefix="<?php if(" suffix=") continue; ?>" />
+ <data directive="@csrf" />
+ <data directive="@dd" injection="true" prefix="<?php dd(" suffix="); ?>" />
+ <data directive="@default" />
+ <data directive="@dump" injection="true" prefix="<?php dump(" suffix="); ?>" />
+ <data directive="@each" injection="true" prefix="<?php echo $__env->renderEach(" suffix="); ?>" />
+ <data directive="@else" />
+ <data directive="@elseauth" injection="true" prefix="<?php elseif(auth()->guard(" suffix=")->check()): ?>" />
+ <data directive="@elsecan" injection="true" prefix="<?php elseif (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check(" suffix=")): ?>" />
+ <data directive="@elsecanany" injection="true" prefix="<?php elseif (app(\Illuminate\Contracts\Auth\Access\Gate::class)->any(" suffix=")): ?>" />
+ <data directive="@elsecannot" injection="true" prefix="<?php elseif (app(\Illuminate\Contracts\Auth\Access\Gate::class)->denies(" suffix=")): ?>" />
+ <data directive="@elseguest" injection="true" prefix="<?php elseif(auth()->guard(" suffix=")->guest()): ?>" />
+ <data directive="@elseif" injection="true" prefix="<?php elseif(" suffix="): ?>" />
+ <data directive="@empty" injection="true" prefix="<?php if(empty(" suffix=")): ?>" />
+ <data directive="@endauth" />
+ <data directive="@endcan" />
+ <data directive="@endcanany" />
+ <data directive="@endcannot" />
+ <data directive="@endcomponent" />
+ <data directive="@endcomponentClass" />
+ <data directive="@endcomponentfirst" />
+ <data directive="@endempty" />
+ <data directive="@enderror" />
+ <data directive="@endfor" />
+ <data directive="@endforeach" />
+ <data directive="@endforelse" />
+ <data directive="@endguest" />
+ <data directive="@endif" />
+ <data directive="@endisset" />
+ <data directive="@endlang" />
+ <data directive="@endphp" />
+ <data directive="@endprepend" />
+ <data directive="@endpush" />
+ <data directive="@endsection" />
+ <data directive="@endslot" />
+ <data directive="@endswitch" />
+ <data directive="@endunless" />
+ <data directive="@endverbatim" />
+ <data directive="@endwhile" />
+ <data directive="@error" injection="true" prefix="<?php $__errorArgs = [" suffix="]; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?>" />
+ <data directive="@extends" injection="true" prefix="<?php echo $__env->make(" suffix=", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>" />
+ <data directive="@for" injection="true" prefix="<?php for(" suffix="): ?>" />
+ <data directive="@foreach" injection="true" prefix="<?php foreach(" suffix="): ?>" />
+ <data directive="@forelse" injection="true" prefix="<?php foreach(" suffix="): ?>" />
+ <data directive="@formField" injection="true" prefix="<?php dd(" suffix=")?>" />
+ <data directive="@guest" injection="true" prefix="<?php if(auth()->guard(" suffix=")->guest()): ?>" />
+ <data directive="@hasSection" injection="true" prefix="<?php if (! empty(trim($__env->yieldContent(" suffix=")))): ?>" />
+ <data directive="@if" injection="true" prefix="<?php if(" suffix="): ?>" />
+ <data directive="@include" injection="true" prefix="<?php echo $__env->make(" suffix=", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>" />
+ <data directive="@includeFirst" injection="true" prefix="<?php echo $__env->first(" suffix=", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>" />
+ <data directive="@includeUnless" injection="true" prefix="<?php echo $__env->renderWhen(! " suffix=", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path'])); ?>" />
+ <data directive="@includeWhen" injection="true" prefix="<?php echo $__env->renderWhen(" suffix=", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path'])); ?>" />
+ <data directive="@isset" injection="true" prefix="<?php if(isset(" suffix=")): ?>" />
+ <data directive="@json" injection="true" prefix="<?php echo json_encode(" suffix=") ?>" />
+ <data directive="@lang" injection="true" prefix="<?php echo app('translator')->get(" suffix="); ?>" />
+ <data directive="@method" injection="true" prefix="<?php echo method_field(" suffix="); ?>" />
+ <data directive="@overwrite" />
+ <data directive="@parent" />
+ <data directive="@php" injection="true" prefix="<?php (" suffix="); ?>" />
+ <data directive="@prepend" injection="true" prefix="<?php $__env->startPrepend(" suffix="); ?>" />
+ <data directive="@push" injection="true" prefix="<?php $__env->startPush(" suffix="); ?>" />
+ <data directive="@section" injection="true" prefix="<?php $__env->startSection(" suffix="); ?>" />
+ <data directive="@show" />
+ <data directive="@slot" injection="true" prefix="<?php $__env->slot(" suffix="); ?>" />
+ <data directive="@stack" injection="true" prefix="<?php echo $__env->yieldPushContent(" suffix="); ?>" />
+ <data directive="@stop" />
+ <data directive="@switch" injection="true" prefix="<?php switch(" suffix="): ?>" />
+ <data directive="@unless" injection="true" prefix="<?php if (! (" suffix=")): ?>" />
+ <data directive="@unset" injection="true" prefix="<?php unset(" suffix="); ?>" />
+ <data directive="@verbatim" />
+ <data directive="@while" injection="true" prefix="<?php while(" suffix="): ?>" />
+ <data directive="@yield" injection="true" prefix="<?php echo $__env->yieldContent(" suffix="); ?>" />
+ </directives>
+ </component>
+</project>
\ No newline at end of file
<dictionary name="Louis">
<words>
<w>mailgun</w>
+ <w>podcast</w>
<w>webhook</w>
<w>webhooks</w>
</words>
--- /dev/null
+<?php
+
+namespace App\Http\Controllers\Admin;
+
+use A17\Twill\Http\Controllers\Admin\ModuleController;
+
+class PodcastController extends ModuleController
+{
+ protected $moduleName = 'podcasts';
+}
--- /dev/null
+<?php
+
+namespace App\Http\Requests\Admin;
+
+use A17\Twill\Http\Requests\Admin\Request;
+
+class PodcastRequest extends Request
+{
+ public function rulesForCreate()
+ {
+ return [];
+ }
+
+ public function rulesForUpdate()
+ {
+ return [];
+ }
+}
--- /dev/null
+<?php
+
+namespace App\Models;
+
+use A17\Twill\Models\Behaviors\HasBlocks;
+use A17\Twill\Models\Behaviors\HasSlug;
+use A17\Twill\Models\Behaviors\HasMedias;
+use A17\Twill\Models\Behaviors\HasFiles;
+use A17\Twill\Models\Model;
+
+class Podcast extends Model
+{
+ use HasSlug, HasMedias, HasFiles, HasBlocks;
+
+ protected $fillable = [
+ 'published',
+ 'title',
+ 'description',
+ 'sponsor',
+ 'sponsor_url',
+ 'publish_start_date',
+ 'guests'
+ ];
+
+ protected $casts = [
+ 'guests' => 'array'
+ ];
+
+ public $slugAttributes = [
+ 'title',
+ ];
+
+ public $mediasParams = [
+ 'sponsor_logo' => [
+ 'logo' => [
+ [
+ 'name' => 'logo',
+ 'ratio' => 0,
+ ],
+ ],
+ ],
+ ];
+}
--- /dev/null
+<?php
+
+namespace App\Models\Slugs;
+
+use A17\Twill\Models\Model;
+
+class PodcastSlug extends Model
+{
+ protected $table = "podcast_slugs";
+}
--- /dev/null
+<?php
+
+namespace App\Repositories;
+
+use A17\Twill\Repositories\Behaviors\HandleBlocks;
+use A17\Twill\Repositories\Behaviors\HandleJsonRepeaters;
+use A17\Twill\Repositories\Behaviors\HandleSlugs;
+use A17\Twill\Repositories\Behaviors\HandleMedias;
+use A17\Twill\Repositories\Behaviors\HandleFiles;
+use A17\Twill\Repositories\ModuleRepository;
+use App\Models\Podcast;
+
+class PodcastRepository extends ModuleRepository
+{
+ use HandleSlugs, HandleMedias, HandleFiles, HandleBlocks, HandleJsonRepeaters;
+
+ protected array $jsonRepeaters = ['guests'];
+
+ public function __construct(Podcast $model)
+ {
+ $this->model = $model;
+ }
+}
},
{
"name": "area17/twill",
- "version": "2.0.1",
+ "version": "2.1.1",
"source": {
"type": "git",
"url": "https://github.com/area17/twill.git",
- "reference": "4e19670cb62b9baeb37354c3998ce05add97328c"
+ "reference": "b420c6954250d18ad0446e65003715ef9ae8dca7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/area17/twill/zipball/4e19670cb62b9baeb37354c3998ce05add97328c",
- "reference": "4e19670cb62b9baeb37354c3998ce05add97328c",
+ "url": "https://api.github.com/repos/area17/twill/zipball/b420c6954250d18ad0446e65003715ef9ae8dca7",
+ "reference": "b420c6954250d18ad0446e65003715ef9ae8dca7",
"shasum": ""
},
"require": {
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.16",
"kalnoy/nestedset": "^5.0",
+ "nunomaduro/collision": "^3.0|^4.2",
"orchestra/testbench": "~3.3|~3.4|~3.5|~3.6|~3.7|~3.8|^4.0|^5.0",
- "phpunit/phpunit": "~5.0|~6.0|~7.0|~8.0"
+ "phpunit/phpunit": "~5.0|~6.0|~7.0|~8.0|~9.0"
},
"type": "library",
"extra": {
"laravel",
"twill"
],
- "time": "2020-03-10T13:05:42+00:00"
+ "time": "2020-07-20T13:54:38+00:00"
},
{
"name": "asm89/stack-cors",
'title' => 'Articles',
'module' => true
],
+ 'podcasts' => [
+ 'title' => 'Podcasts',
+ 'module' => true
+ ]
+
]
],
'icon' => 'image',
'component' => 'a17-block-image',
],
+ 'guest' => [
+ 'title' => 'Invité',
+ 'icon' => 'image',
+ 'component' => 'a17-block-guest'
+ ]
],
'crops' => [
+ 'profile' => [
+ 'profile' => [
+ 'name' => 'profile',
+ 'ratio' => 1
+ ]
+ ],
'image' => [
'desktop' => [
[
],
],
],
- 'repeaters' => [],
+ 'repeaters' => [
+ 'guests' => [
+ 'title' => 'Invités',
+ 'trigger' => 'Ajotuer des invités',
+ 'component' => 'a17-block-guests',
+ ]
+ ],
],
];
--- /dev/null
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+
+class CreatePodcastsTables extends Migration
+{
+ public function up()
+ {
+ Schema::create('podcasts', function (Blueprint $table) {
+ // this will create an id, a "published" column, and soft delete and timestamps columns
+ createDefaultTableFields($table);
+
+ // feel free to modify the name of this column, but title is supported by default (you would need to specify the name of the column Twill should consider as your "title" column in your module controller if you change it)
+ $table->string('title', 200)->nullable();
+
+ // your generated model and form include a description field, to get you started, but feel free to get rid of it if you don't need it
+ $table->text('description')->nullable();
+
+ // add those 2 columns to enable publication timeframe fields (you can use publish_start_date only if you don't need to provide the ability to specify an end date)
+ $table->timestamp('publish_start_date')->nullable();
+ // $table->timestamp('publish_end_date')->nullable();
+
+ $table->string('sponsor')->nullable();
+ $table->string('sponsor_url')->nullable();
+
+ });
+
+ Schema::create('podcast_slugs', function (Blueprint $table) {
+ createDefaultSlugsTableFields($table, 'podcast');
+ });
+
+
+ }
+
+ public function down()
+ {
+
+ Schema::dropIfExists('podcast_slugs');
+ Schema::dropIfExists('podcasts');
+ }
+}
'name' => 'image',
'label' => 'Image',
])
+
@stop
--- /dev/null
+
+@twillRepeaterTitle('Invité')
+@twillRepeaterTrigger('Ajouter un invité')
+@twillRepeaterGroup('app')
+@formField('medias', [
+ 'name' => 'image',
+ 'label' => 'Photo',
+ 'withVideoUrl' => false,
+ 'max' => 1,
+])
+@formField('input', [
+ 'name' => 'name',
+ 'label' => 'Nom',
+ 'maxlength' => 250,
+ 'translated' => false,
+])
+@formField('input', [
+ 'name' => 'job',
+ 'label' => 'Fonction',
+ 'maxlength' => 250,
+ 'translated' => false,
+])
--- /dev/null
+@extends('twill::layouts.form', [
+ 'additionalFieldsets' => [
+ [
+ 'fieldset' => 'guests',
+ 'label' => 'Invités'
+ ],
+ [
+ 'fieldset' => 'sponsor',
+ 'label' => 'Partenaire',
+ ]
+ ]
+])
+
+@section('contentFields')
+ @formField('input', [
+ 'name' => 'description',
+ 'label' => 'Sommaire',
+ 'maxlength' => 600,
+ 'type' => 'textarea',
+ 'required' => true,
+ 'rows' => 5
+ ])
+@stop
+
+@section('fieldsets')
+
+ @component('twill::partials.form.utils._fieldset', ['id' => 'guests', 'title' => 'Invités'])
+ @formField('repeater', ['type' => 'guests'])
+
+ @endcomponent
+
+ @component('twill::partials.form.utils._fieldset', ['id' => 'sponsor', 'title' => 'Partenaires'])
+
+ @formField('input', [
+ 'name' => 'sponsor',
+ 'label' => 'Nom du partenaire',
+ 'hint' => 'Une émission en partenariat avec...',
+ ])
+
+ @formField('input', [
+ 'name' => 'sponsor_url',
+ 'label' => 'Site web',
+ 'hint' => 'https://',
+ ])
+
+ @formField('medias', [
+ 'name' => 'sponsor_logo',
+ 'label' => 'Logo',
+ 'max' => 1,
+
+ ])
+
+
+ @endcomponent
+
+@stop
</a>
</div>
<div>
- <a href="#">
+ <a href="{{route('AdCampaignController@index')}}">
<img src="{{asset('img/nav/2-lacom.svg')}}" alt="Pill Icon">
<p>Campagnes<br>&<br>Com­munication</p>
</a>
Route::module('articles');
Route::module('adCampaigns');
Route::module('events');
+ Route::module('podcasts');
});