File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,12 @@ class TemplateModel extends Model
2828 * @throws TemplatesException
2929 */
3030 public function findByName (string $ name ): Template
31- {
32- if ($ template = $ this ->where ('name ' , $ name )->first ())
33- {
34- return $ template ;
35- }
31+ {
32+ if ($ template = $ this ->where ('name ' , $ name )->first ())
33+ {
34+ return $ template ;
35+ }
3636
3737 throw TemplatesException::forMissingTemplate ($ name );
38- }
38+ }
3939}
Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ class="form-control"
3030 <option value="">NONE</option>
3131
3232 <?php foreach ($ templates as $ temp ): ?>
33- <?php if ($ temp ->id === $ template ->id ): continue ; endif ; ?>
34- <option value="<?= $ temp ->id ?> " <?= $ temp ->id === $ template ->parent_id ? 'selected ' : '' ?> ><?= $ temp ->name ?> </option>
33+ <?php if ($ temp ->id == $ template ->id ): continue ; endif ; ?>
34+ <option value="<?= $ temp ->id ?> " <?= $ temp ->id == $ template ->parent_id ? 'selected ' : '' ?> ><?= $ temp ->name ?> </option>
3535 <?php endforeach ; ?>
3636
3737 </select>
You can’t perform that action at this time.
0 commit comments